Vibeleaderboard
← All Intel
Intel / article

External sandboxes for coding agents

Source
simonwillison.net
Date

Context

Simon Willison and Prime Radiant, the AI research lab behind the Superpowers project, have released three prototype sandboxes built on what they call the external pattern. A coding such as Claude Code, Codex or Pi keeps running normally on your computer, but whenever it wants to execute code it sends the command to a separate Linux sandbox instead. Willison's aim is to make it safer to try local models, without worrying that a mistake, or a attack in which hostile text the agent reads steers its actions, leads the agent to damage the machine.

Prime Radiant's write-up explains why the agent itself stays outside. Run inside the sandbox, an agent could modify its own environment; kept outside, it leaves one well-defined boundary that is easier to audit. The three servers differ mainly in how they isolate code (Alpine Linux in WebAssembly through v86, inside Apple Containers, or under QEMU using Microsoft's Quicksand library), and all expose the same local API, so each agent is configured once to send its commands there. The sandbox has no network access by default. An optional proxy allows only listed hosts and HTTP methods, and can attach a real API key to approved requests while the sandbox holds only a placeholder, so code inside can make authenticated calls without seeing the secret.

The authors call these experimental prototypes that have not been audited for sensitive workloads, and they name gaps that matter in use. A folder mounted with write access can still be damaged, so they recommend version control and read-only mounts where possible. With Claude Code, only shell commands go to the sandbox; its Read and Edit tools still act directly on the host. An approved host could also echo a credential back in its response. The proxy addresses a weakness that a Vercel essay on sandbox design describes: code that cannot escape its isolated machine can still send data out if its network connections are unrestricted.

Key takeaways · AI-distilled
  • The external sandbox pattern Simon Willison describes with Prime Radiant keeps the coding agent outside the sandbox and sends only the code it executes into a dedicated sandbox, aimed at trying local models without risking damaging actions on the host machine.
  • Three reference servers expose the same localhost API: one runs Alpine Linux in WebAssembly via v86 under Node.js, one uses Apple Containers, and one uses Microsoft's Quicksand library, which bundles QEMU and Alpine Linux in a Python package.
  • Pi, Claude Code or Codex can be configured to call that sandbox API whenever they execute code, and an optional allow-list proxy limits which hosts the code can reach while a credential replacement mechanism makes authenticated calls without giving the agent the secret.
Terms in this piece · Glossary
  • sandbox — An isolated environment where AI-generated code or agent actions run without being able to touch anything real.
  • AI agent — An AI system that doesn't just answer once but works toward a goal in a loop — taking actions, reading the results, and deciding what to do next.
  • prompt injection — An attack that hides instructions in content an AI will read — a webpage, email, or document — tricking it into following the attacker instead of the user.
Read the source simonwillison.net
Recommended reads
Comments

Checking sign-in…

Loading comments…