Keep the coding agent on the Mac, lock its commands inside Linux: three approaches to external sandboxes
Simon Willison and Prime Radiant have released three external sandbox prototypes. Claude Code, Codex, and Pi continue to run on the Mac, while commands are sent into Linux inside WebAssembly, Apple Containers, or QEMU. Networking is disabled by default, and mounts and proxies can be tightened. Commenters also pointed out the limitations.
Simon Willison and Prime Radiant have released a set of external sandbox prototypes. The goal is straightforward: keep coding agents such as Claude Code, Codex, and Pi running on the Mac, while sending the commands they want to execute into a separate Linux sandbox. The sandbox can only see the folders you mount, and by default it cannot access the network.
Simon included a blog post and an index repository in his tweet. The three implementations share the same HTTP and WebSocket protocol: v86 plus WebAssembly running Alpine Linux, Apple Containers running a Linux container, and Microsoft Quicksand plus QEMU running a full virtual machine. The ports are 8686, 8687, and 8688, respectively, and they can run side by side.

Why is this needed? Coding agents will write incorrect commands, and they can also be derailed by prompt injection. Anything they can read or write can be corrupted or leaked. Simon's view is that manually approving every action looks safe but quickly turns into decision fatigue, with users clicking approve all the way through. The value of a sandbox is that protection does not depend on model judgment. This matters even more for cheap models, local models, and less capable models.
The boundary of the external sandbox. The agent runs on the host, the sandbox server runs on localhost, and commands execute inside a Linux VM. The VM has only two exits: the folders you mount and the allow-list proxy. Without a mount there are no files; without a proxy there is no network.
Trying it is also deliberately restrained. The official minimal demo is two npx commands: start the sandbox first, then start Pi. In Pi, run !uname -a; if the output is Linux rather than Darwin, that means the command went into the sandbox.

npx --yes external-sandbox-v86 --preserve-paths --mount-rw "project=$PWD"
npx --yes @earendil-works/pi-coding-agent -e npm:external-sandbox-pi --no-builtin-tools --sandbox-url http://127.0.0.1:8686
Each of the three backends has trade-offs. v86 runs entirely in Node.js and WebAssembly, so it is the lightest to install. Apple Containers depends on Apple silicon and the container CLI. Quicksand packages QEMU and an Alpine image as a Python wheel and runs via uvx. All three implement the same protocol, and there is also a conformance testing tool.
Network control is a key point. Networking is off by default. When starting, add --proxy or --proxy-config; the proxy allows requests by host and HTTP method. Credential replacement is the more interesting layer: code inside the sandbox only receives placeholders, and the proxy substitutes the real key from the host environment when sending the request. The agent never sees the key. Simon also warns that credential rules should only be used for trusted services, with methods narrowed.


The limitations are just as obvious. Claude Code only sends commands from the Bash tool into the sandbox; Read and Edit still run on the local machine. Codex sends process and filesystem operations. Pi replaces bash, read, write, edit, grep, find, and ls. Commenter Aditya Batra reminded Claude Code users: only bash goes into the box; read and edit still touch real files. Shyan-Ming Perng said this leads to two separate policies. zhitong mentioned that symlinks in shared mounts could bypass the boundary. Jeff Bruchado was more concerned about git push with host credentials. John K said file synchronization would be a latency bottleneck for fast edit-and-test loops. lena said permission fatigue still exists: loosen a rule once, and two weeks later the sandbox has little constraining power. These doubts were not answered by performance numbers. The source material does not give numbers for how much slower Apple Container is than running directly. Simon himself says these are still experimental prototypes and have not been security-audited. Read-write mounts can still damage that folder, and macOS dependencies such as node_modules or .venv may need to be reinstalled inside the sandbox.
So the value of an external sandbox is not 'one-click security.' It pulls the agent's code-execution surface into an auditable Linux boundary with a limited number of exits, and policies you can inspect and change. It is suitable for people who want to try weaker models, local models, or who do not want to grant full permissions. Count the exits clearly first, then talk about trust. The protocol and repository are here: PROTOCOL.md, external-sandbox.
发布时间: 2026-11-17 10:26