Repository navigation
Sandbox Linux
just sandbox-linux runs one live Claude Code session in a Linux container.
It checks that the sandbox blocks a Unix socket in a Bash call.
Run it before you change the sandbox keys of the settings snippet.
It uses your login and costs money.
The seccomp helper of the native Claude Code build must block a Unix socket in a sandboxed Bash call.
The script is tools/sandbox/linux/run.ts, and it runs tools/sandbox/linux/check.sh in the container.
The session uses these settings:
{"sandbox": {"enabled": true, "failIfUnavailable": true,
"allowUnsandboxedCommands": false, "autoAllowBashIfSandboxed": true}}The prompt asks Claude to run one socat call to $SSH_AUTH_SOCK.
The socket is a fake agent of socat in the container, not the ssh-agent of the host.
A control call outside the sandbox must connect.
| Verdict | Meaning |
|---|---|
blocked |
The control connects and the sandboxed call does not |
reached |
The sandboxed call connects |
unknown |
The control fails or the session gives no result |
The recipe exits with 1 for any verdict but blocked.
- Build the image from the image of
just docker, withbubblewrapandsocatadded (tools/sandbox/linux/Dockerfile). - Read the login of the host, from the Keychain on macOS or
.credentials.jsonon Linux. - Stop when the access token has less than
LINUX_TOKEN_MIN_MINUTES(30) minutes left. A refresh in the container would make the login of the host fail. Run oneclaudecommand on the host to refresh it, then run the recipe again. - Run the container with
--rm,--privileged(sobwrapcan make namespaces), andDOCKER_CPUSCPUs. The login goes in on stdin, and no file of the host gets it. - Print the control result, each
Bashcommand and result, the sandbox lines of stderr, and the verdict.
The session uses the model LINUX_SESSION_MODEL (haiku) for one short turn of at most 3 turns.
Ask the user before each run.
The recipe does not run in just docker, because it needs the login of the host.
claudetto
- Start
- Slices
- Add-Ons
- Reference
- Rationale
- Evidence
- Development
Claude Code