Parallel Coding Agents
When three or four coding agents run cargo test, pnpm build, or pytest concurrently on one laptop, CPU thermal throttling and RAM exhaustion stall every agent at once. offrig keeps each agent’s local git Worktree authoritative while dispatching heavy build/test runs onto isolated remote Sandboxes.
Automatic per-Worktree isolation
Section titled “Automatic per-Worktree isolation”Every linked git Worktree automatically gets its own persistent Layer-2 Sandbox forked from the shared Base Snapshot and Deps Snapshot:
git worktree add ../feat-auth -b feat/authgit worktree add ../feat-billing -b feat/billingAgent A running offrig cargo test inside ../feat-auth and Agent B running offrig cargo test inside ../feat-billing never share a mutable filesystem or fight over target/ locks.
For completely ephemeral one-shot isolation inside the same Worktree, pass --isolated:
offrig --isolated --ro cargo test --workspaceSeparating offrig flags from command flags
Section titled “Separating offrig flags from command flags”Every flag before the command (or before --) belongs to offrig; every token from the command onward passes verbatim to the remote Sandbox:
offrig --rig box --json --report-file /tmp/run.json -- cargo test -- --nocaptureUse -- whenever the target command starts with a reserved subcommand name (run, shell, snap, sandbox, sync, rig, daemon, init, status, doctor, shim, mcp, skill, version).
Machine-readable telemetry (--json and --report-file)
Section titled “Machine-readable telemetry (--json and --report-file)”Agent harnesses can consume structured telemetry (schema_version: 1) without scraping terminal output:
| Flag | Behavior |
|---|---|
--json or --json=summary |
Emits one JSON summary envelope on stdout at Run completion (exit code, rig, sandbox, sync bytes, resource peaks, write-back summary). |
--json=stream |
Emits newline-delimited JSON (NDJSON) events in real time as stdout/stderr chunks and lifecycle stages stream. |
--report-file <PATH> |
Streams normal human output to stdout/stderr while writing the JSON summary envelope to <PATH>. |
Deterministic exit codes
Section titled “Deterministic exit codes”offrig preserves exact command exit codes (0–123, 128+N for signals) and reserves 124–127 for unambiguous harness handling:
| Exit code | Meaning |
|---|---|
0–123 |
Remote command exit status (parity with local execution). |
124 |
Guarded Write-back aborted due to a local-edit conflict ([sync].conflict = "fail"). Local Worktree left untouched; recover with offrig sync pull. |
125 |
offrig CLI parse, configuration, trust-boundary, or Provider infrastructure error. |
126 |
Remote executable found but could not be invoked (permission / exec format error). |
127 |
Remote command not found inside the Sandbox. |
Built-in MCP Server (offrig mcp)
Section titled “Built-in MCP Server (offrig mcp)”offrig ships a built-in stdio MCP server (offrig mcp [--cwd <PATH>] [--rig <NAME>] [--no-daemon] [--read-only]) exposing 19 structured offrig_* tools directly over offrig’s core library and Local daemon:
{ "mcpServers": { "offrig": { "command": "offrig", "args": ["mcp"] } }}- Execution & Write-back recovery:
offrig_run,offrig_sync_pull(reusingdaemon.sock, bounded UTF-8-safe head+tail output capture viaOFFRIG_MCP_MAX_OUTPUT_BYTES, raw + base64 secret redaction, andnotifications/progress+notifications/cancelledsupport). - Read-only inspection (the exact
--read-onlyset):offrig_status,offrig_doctor,offrig_rig_list,offrig_rig_status,offrig_sandbox_list,offrig_sandbox_status,offrig_snap_list,offrig_snap_inspect. - Sandbox & Snapshot management:
offrig_sandbox_resize,offrig_sandbox_reset,offrig_sandbox_stop,offrig_sandbox_rm,offrig_snap_build,offrig_snap_save,offrig_snap_rollback,offrig_snap_prune,offrig_snap_rm.
Official offrig Agent Skill
Section titled “Official offrig Agent Skill”Install the bundled offrig coding-agent skill (teaching agents when to offload, how to recover from exit 124 Write-back conflicts and OOM events, and how to respect the local trust boundary) with either the bundled CLI or npx skills:
# Offline install directly from the offrig binary (defaults to ~/.agents/skills/offrig)offrig skill installoffrig skill install --agent claude --agent codex --project
# Or directly from GitHub via the Agent Skills CLInpx skills add spiritledsoftware/offrigZero-prompt routing with Load-Aware Shims
Section titled “Zero-prompt routing with Load-Aware Shims”If you want coding agents to call cargo, pnpm, or pytest directly without changing their prompts, see Load-Aware Shims.