getbelay.dev

belay

Pre-alpha

Guides

Checked

belay on GitHub

belay and sandboxes

Claude Code’s sandbox lets shell commands write to the working directory. In there, an agent can still rewrite a test, add .git/hooks/pre-push or edit CLAUDE.md: the sandbox allows all three and lists none of them.

  • Claude Code sandboxes shell commands: writes to the working directory and paths you allow, network through a domain allowlist. “The sandbox covers shell commands only.”
  • Codex has read-only, workspace-write and danger-full-access, via Seatbelt or bubblewrap.
  • Containers keep the agent off the rest of the machine.

A sandbox is better at: stopping things. A write to ~/.ssh fails before it happens; belay can only report a change after it lands, and only inside the directory it records.

belay is better at: telling you what changed inside. Neither agent’s sandbox does.

Both: the rerun ran each agent in a container with network to its vendor’s API only, and belay recorded inside. belay can also read a container from the host with --docker (Linux, root).

Sources, checked 2026-11-28: Claude Code Sandboxing, Codex Sandboxing.