Claude Code sandbox setup: routing micro-forks to JEV in milliseconds
Explains running Claude Code in an OS-enforced sandbox for unattended runs, with JEV handling millisecond micro-forks like which command or host so big models only see real splits.
THIS IS ACTUAL F*CKING GOLD Anthropic just shared one of the best tricks for Claude Code. The idea: put every shell command the agent runs inside an OS-enforced sandbox, so it stops asking you to approve them. Unattended runs at full speed, without handing the agent your whole machine the way --dangerously-skip-permissions does. You just launch Claude Code like this: claude --settings '{"sandbox":{"enabled":true}}' here's the split: → writes land in the working directory and a temp dir, nowhere else → network has no direct route out, every host goes through a local proxy → sandboxed commands approve themselves, so the prompts stop → the operating system holds the boundary while the command runs, not a model It still stops you at three moments: → rm or rmdir aimed at a critical path → any command a deny rule matches → an ask rule like Bash(git push *) The sandbox contains. The rules block. You approve. JEV engineering is the same move one layer down: the forks that need no thinker (which command, which host, retry or stop) go to JEV in milliseconds, and the big models only see the ones that split the full tree > /sandbox turns it on here, sandbox.enabled true turns it on everywhere > writes: the working directory, a temp dir, and anything you pass with --add-dir > reads: most of the machine, so put ~/.ssh and ~/.aws into denyRead yourself > network: allowedDomains starts empty, the first new host asks once > allowUnsandboxedCommands false closes the unsandboxed retry hatch > JEV routes micro-forks in milliseconds paste the tree and this prompt into Claude Code ↓ "Set up my Claude Code sandbox from this tree: 1. Turn the sandbox on in ~/.claude/settings.json and set /sandbox to auto-allow. 2. Put ~/.ssh, ~/.aws and every other credential path into sandbox.filesystem.denyRead, and fill network.allowedDomains with only the hosts this repo actually calls. 3. Set allowUnsandboxedCommands to false and failIfUnavailable to true, so nothing quietly runs outside the boundary. 4. Route fast deterministic forks (which command, which host, retries) through JEV. Show me every change as a diff first. No edits until I say go." ↳ http://code.claude.com/docs/en/sandboxing save it, you'll use this every single day.
This post quotes another post: x.com/hanakoxbt/status/2112245381601878026