Memory Guard & Troubleshooting
cgroup v2 Memory Guard
Section titled “cgroup v2 Memory Guard”Heavy linkers (lld, rustc, webpack, tsc) can abruptly OOM-kill a container without telling you which process spiked memory. Every Sandbox runs offrigd’s cgroup v2 memory guard by default:
| Config key | Default | Purpose |
|---|---|---|
[resources].memory_guard |
true |
Enable cgroup v2 soft/hard memory protection inside the Sandbox. |
[resources].memory_guard_soft_pct |
90 |
Soft pressure warning threshold (% of cgroup limit). |
[resources].memory_guard_hard_pct |
95 |
Hard protective ceiling (% of cgroup limit) before kernel OOM-killer strikes. |
[resources].memory_guard_soft_min_mib |
512 |
Minimum headroom floor (MiB) for soft pressure threshold. |
[resources].memory_guard_hard_min_mib |
256 |
Minimum headroom floor (MiB) for hard protective threshold. |
When memory pressure hits the ceiling, offrigd reports the exact limit name, observed peak RSS, and where to raise [resources].memory_mib (or live-resize with offrig sandbox resize --memory <MiB>).
End-to-end diagnostics (offrig doctor)
Section titled “End-to-end diagnostics (offrig doctor)”Always start troubleshooting with offrig doctor:
# Full check of CLI, config layers, Local daemon, offrigd sidecars, SSH, Shims, and default Rigoffrig doctor
# Check every configured Rigoffrig doctor --all
# Check one specific Rig in JSONoffrig doctor --rig box --jsonCommon issues
Section titled “Common issues”- Missing
offrigdsidecar aftercargo install:cargo installbuilds only the host CLI. Install via Homebrew orhttps://offrig.dev/install.shfor bundled SHA-256-verified Linux sidecars, or runjust workersin a source checkout. - Exit
124after a Run: A file in your local Worktree was modified while the remote Run was active. Your local file was left untouched; runoffrig sync pull(with--conflict keep-localor--conflict overwrite) to reconcile. - Trust-boundary error on
offrig.toml: Checked-inoffrig.tomlfiles cannot define[secrets.*](includingenv),[rigs.*],[git],[shim], escape the Worktree root in[sync].include, or enableallow_host_docker(run.docker = "host"requires user-local opt-in on the Rig). Move local secret resolvers into~/.config/offrig/config.tomlor gitignoredoffrig.local.toml. - Stale Local daemon state: Check
offrig daemon statusor restart cleanly withoffrig daemon stop(the next Run auto-starts a fresh daemon), or bypass it for one Run with--no-daemon.