Skip to content
Development
Command

/sandbox-exec

Run a single command inside a running sandbox box and capture a JSON result — exitCode, separate stdout/stderr, and a truncated flag past the byte cap. The scriptable exec seam.

From plugin
codearbiter
15338 skills20 agents38 commands
> /plugin marketplace add arbiterForge/codeArbiter

Command definition

sandbox-exec.md
description: Run a single command inside a running sandbox box and capture a JSON result — exitCode, separate stdout/stderr, and a truncated flag past the byte cap. The scriptable exec seam.
argument-hint: "<sandbox id> -- <command> [args...]"

/ca-sandbox:sandbox-exec — exec a command in the box

Run one command inside a running sandbox and get back a structured result. Unlike the interactive shell, exec is the scriptable seam: it returns a JSON contract — `exitCode`, separated `stdout` and `stderr`, and a `truncated` flag that trips when output exceeds the byte cap — so the result is machine- consumable. The command runs under the box's isolation; it cannot reach the host filesystem.

This is the seam the farm dispatcher's deferred process-level sandbox (`item-3`) is shaped to use; it is also callable directly from a test via `execInSandbox`.

Flow

1. **Resolve the box** — find the running `ca.sandbox=1` container for the id. STOP if absent. 2. **Exec** — call `execInSandbox` in `${CLAUDE_PLUGIN_ROOT}/tools/exec.ts` with the argv after `--`. `exec <id> -- sh -c 'exit 7'` returns `exitCode: 7`. 3. **Report the JSON result** — `exitCode`, `stdout`, `stderr` (kept separate), and `truncated` (true when output passed the byte cap). The exit code is surfaced, never swallowed.

Routes to

`sandbox-lifecycle` (`${CLAUDE_PLUGIN_ROOT}/skills/sandbox-lifecycle/SKILL.md`) — Phase 4 (interact), via the `execInSandbox` seam in `${CLAUDE_PLUGIN_ROOT}/tools/exec.ts`.

When NOT to use

  • Interactive browsing → `/ca-sandbox:sandbox-shell`.
  • Pulling a produced artifact out to the host → `/ca-sandbox:sandbox-cp`.
  • No box exists yet → `/ca-sandbox:sandbox`.

Hard gate

  • MUST run only inside a running `ca.sandbox=1`-labeled container; MUST NOT introduce a bind, a

docker-socket mount, or a dropped privilege.

  • MUST return the real `exitCode` and keep `stdout`/`stderr` separate; MUST NOT collapse a non-zero

exit into success.

  • MUST honor the output byte cap — set `truncated` rather than streaming unbounded output.
  • MUST NOT use exec to copy host files in or grant the box host-FS access; file egress is host-initiated

`docker cp` out only.

Read more
@arbiterforge
Ships withcodearbiter

Open-source governance and hard gates for AI coding agents across Claude Code, Codex CLI, and Pi.

15356 skills20 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
153
Star history of arbiterForge/codeArbiter on GitHub, a chart by star-history.com

Other commands on codearbiter.

add-dep

add-dep

Command

Vet a new or changed third-party dependency for license, provenance, and supply-chain risk before any install runs.

audit

audit

Command

Assemble the governance record for a range — commits, overrides, ADRs, sprint auto-decisions, open questions, checkpoint findings…

chore

chore

Command

Sanctioned lane for non-behavioral work — docs-only edits, dependency bumps, reverts. Type-scaled gates; no TDD demanded of prose.

More commands from other plugins.

build
Auto-invoked

build

Command

Implement tasks incrementally — build, test, verify, commit. Add "auto" to run the whole plan in one approved pass.

@addyosmani@addyosmaniInstall Command