Skip to content

Memory Guard & Troubleshooting

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>).

Always start troubleshooting with offrig doctor:

Terminal window
# Full check of CLI, config layers, Local daemon, offrigd sidecars, SSH, Shims, and default Rig
offrig doctor
# Check every configured Rig
offrig doctor --all
# Check one specific Rig in JSON
offrig doctor --rig box --json
  • Missing offrigd sidecar after cargo install: cargo install builds only the host CLI. Install via Homebrew or https://offrig.dev/install.sh for bundled SHA-256-verified Linux sidecars, or run just workers in a source checkout.
  • Exit 124 after a Run: A file in your local Worktree was modified while the remote Run was active. Your local file was left untouched; run offrig sync pull (with --conflict keep-local or --conflict overwrite) to reconcile.
  • Trust-boundary error on offrig.toml: Checked-in offrig.toml files cannot define [secrets.*] (including env), [rigs.*], [git], [shim], escape the Worktree root in [sync].include, or enable allow_host_docker (run.docker = "host" requires user-local opt-in on the Rig). Move local secret resolvers into ~/.config/offrig/config.toml or gitignored offrig.local.toml.
  • Stale Local daemon state: Check offrig daemon status or restart cleanly with offrig daemon stop (the next Run auto-starts a fresh daemon), or bypass it for one Run with --no-daemon.