What a sandboxed agent can reach
The whole agent process runs inside, with the MCP servers it starts; each harness’s own sandbox is off, since sandboxes don’t nest reliably.- Writes: its worktree, the main checkout’s git directory (its hooks and config read-only, so a script cannot plant a hook the bot later runs outside), a private temp, and a private home for the session.
- Reads: the toolchain on your
PATH. - Network: full.
- Never: your home directory, other repos, or a GitHub token. The guard still checks every tool call.
Logins
The private home holds no login of yours. Give the agent its own through the provider’senv (an OAuth token from claude setup-token, say); the bot uses the login psychiatrist init stored. A sandbox’s own env must not share a key with the provider’s.
Sessions
A session’s record lives in its private home while it runs. After every turn the provider copies it to your own harness folder, so the harness’s own resume works from your terminal (claude --resume <id>, codex resume <id>); captureSessions: false turns that off. A resume or fork moves the record back in, after checking it exists.
Per harness
Windows, and Linux without Bubblewrap, run unsandboxed with a warning.