On November 17 Simon Willison described the "external sandbox" pattern on X: coding agents such as Claude Code, Codex and Pi run on your Mac, but the commands and file operations they execute are sent to an isolated Linux environment. Together with Prime Radiant, the lab behind Superpowers, he open-sourced the prototypes on GitHub under Apache 2.0: a shared HTTP/WebSocket protocol with a pytest conformance runner, plus three backends built on v86 (WebAssembly), Apple Container and Quicksand QEMU, each with an optional HTTP/HTTPS allow-list proxy and credential replacement. The post drew about 700 likes and more than 190 replies.

Key Takeaways

  • ✓The idea: the agent harness stays on the host and only the commands and file operations it executes go into the sandbox; Willison says this keeps the agent's own credentials out of the sandbox and lets you disable networking there entirely while the agent still talks to its model
  • ✓Three backends: external-sandbox-v86 (Node.js, Linux on v86/WebAssembly, one npx command, about 36 MB), external-sandbox-container (Apple Container) and external-sandbox-quicksand (QEMU)
  • ✓Integrations: Claude Code uses a shell prefix that sends the whole command to /exec/ws; Codex routes process and filesystem operations, including apply_patch, to the sandbox through a /codex endpoint, tested with Codex CLI 0.164.0; Pi has a separate extension published to npm
  • ✓Security controls: an optional HTTP/HTTPS host allow-list proxy plus credential replacement, so code in the sandbox can make authenticated API calls without seeing the real secret
  • ✓Status: prototypes under Apache 2.0; the Codex exec-server protocol is still experimental and newer CLI versions need their own compatibility check
🧭

Heavy Claude Code use: compare subscription limits and API bills

Compare 40 dev plans & simulate token costs vs $20/mo subscriptions

🔬

In-Depth Technical Analysis

Background

Coding agents run the commands they write directly on a developer's machine, so one bad or injected command can delete files or leak secrets. The usual fix is to put the whole agent in a container, but then the agent's model credentials go in with it. On November 17 Simon Willison proposed an alternative on X: the external sandbox.

How it works

The agent runs on the Mac as usual, but when it executes commands or reads and writes files, those calls go to an isolated Linux environment. He and Prime Radiant open-sourced a shared HTTP/WebSocket protocol, a pytest conformance runner and three backends: v86 (WebAssembly), Apple Container and QEMU. Host directories are mounted into the sandbox read-write or read-only, and an optional allow-list proxy controls which hosts code can reach, with credential replacement so code can call APIs without getting the real secret.

Numbers that matter

There are no benchmarks and no published performance or startup-time figures. The repository includes conformance tests and historical verification results, but notes that those results only apply to the commits that were tested.

What it means for developers

The quickest way to try it is to run npx external-sandbox-v86 in a project directory to start the v86 backend, then follow the claude-code or codex folder instructions to connect Claude Code or Codex; Pi users install the Pi extension from npm. It is still a prototype, and the Codex integration has only been tested with CLI 0.164.0.

Action HubReady to adopt this in production?

Benchmark side-by-side against alternatives, or calculate monthly token cost vs subscription break-even.

Up NextX Debate: AI Commentator Chubby Says Claude Code and Opus 5.5 Have Been His Daily Driver for Two Months and GPT Is "Not Close," but Concedes Computer Use Is Still GPT's Edge; 150+ Replies Focus on Splitting Work by Task and the Same-Day Claude Login Outage
Read Now→