
Sandboxing coding agents usually means putting the whole agent inside a box. Simon Willison and the team at Prime Radiant tried the opposite. In a write-up published November 16, they describe what they call external sandboxes. Claude Code, Codex or Pi keeps running on your machine as normal, and every command the agent wants to run goes to a separate Linux guest. The guest sees only the folders you mount, has no network unless you turn on a proxy, and never holds your API keys.
They released three prototypes. One runs Alpine Linux in WebAssembly through v86, one uses Apple Containers, and one uses Microsoft's Quicksand with QEMU. All three speak the same localhost protocol, so any of the agents works with any of the sandboxes. The reason for keeping the agent outside is practical. An agent living inside its own sandbox is able to modify itself and its direct environment, which makes the boundary harder to reason about. With the agent on the outside, the boundary is one API you read and audit.
The network piece is what I'd copy first. The proxy blocks everything by default. You add rules naming an origin and the HTTP methods allowed, and a web UI logs each request the agent's code makes. Keys get added at the proxy. The guest sends a placeholder, the proxy swaps in the real secret on the way out, and the agent never sees the key. Willison wrote the aim was to try local models without worrying that a mistake or a prompt injection attack would do damage on the machine.
Why sandboxing coding agents still matters as models improve
Model makers keep reporting better resistance to prompt injection, and the numbers look good. OpenAI's GPT-6.2 system card, published November 17, puts GPT-6.2 Sol at 99.76% resistance against attacks adapted from public challenges. In environments where an automated attacker writes both the setting and the injection, the figure drops to 91.65%. Count only the attacks the model resisted on all five tries and Sol lands at 80.06%, as Patronus Protect points out. A score like that helps you pick a model. It says nothing about what a fooled agent is allowed to touch on your laptop or your servers.
The setup is modest. Mount the project read-only when the task only needs to read. Give network access through an allow list with the few hosts the job needs, and keep keys at the proxy. Point credential rules only at services you trust, since The Injection's summary flags that an allowed host might echo a swapped-in secret back in its response. Keep the work in version control. Also check how your agent connects. Claude Code sends only its Bash commands through the sandbox, so its own file read and edit tools still act on the host.
The authors call these unaudited prototypes, and that's fair. The habit is worth picking up now anyway. Decide what an agent's code gets to read, write and call before you hand over the keyboard, then put that decision somewhere the agent has no way to change.