External sandboxes for coding agents
AI-generated summary of reporting by Simon Willison’s Weblog. Read the original for the full story.
Why it matters
Developers running coding agents like Claude Code, Codex or Pi can now isolate executed code in a sandbox, so prompt injection or model mistakes can't damage the host machine.
Simon Willison, working with the research lab Prime Radiant, published a way to let AI coding assistants run code safely. Three open-source 'sandbox' servers run the AI's code in a sealed-off mini-computer, for example, Alpine Linux inside Apple Containers, while the AI itself stays outside. The sandboxes include a proxy that restricts which websites the code may contact and can supply secret passwords without ever showing them to the AI. This protects people running local AI models from prompt injection attacks or simple mistakes.
Willison and Prime Radiant released three interchangeable sandbox servers (external-sandbox-v86, external-sandbox-container, external-sandbox-quicksand) exposing one identical localhost API. Any team using coding agents like Claude Code, Codex or Pi can point them at a sandbox to contain untrusted code execution, cutting the risk of prompt injection causing real damage. Network access is controlled through an allow-list proxy with credential replacement, so agents never hold secrets. Adoption is optional but cheap; competitors building agent-safety tooling lose some differentiation.
The 'external sandbox' pattern places the agent outside the sandbox while its code executes inside one. Three implementations share a single localhost API: external-sandbox-v86 (Node.js running Alpine Linux in WebAssembly via v86), external-sandbox-container (Python server using Alpine Linux in Apple Containers), and external-sandbox-quicksand (Python using Microsoft's Quicksand library, which bundles QEMU and Alpine). Sandboxes include an HTTP/HTTPS allow-list proxy with a live reconfiguration UI and a credential replacement mechanism for authenticated API calls without exposing secrets to the agent.
Questions this answers
The article above answers these:
- How do I sandbox code executed by Claude Code or Codex?
- What are the external-sandbox-v86 and external-sandbox-quicksand servers?
- How can an AI agent call authenticated APIs without seeing my secrets?
Read the original
This summary exists to save you time, not to replace the source.
Key terms
Simon Willison Prime Radiant Superpowers v86 Quicksand Apple Containers Datasette
Was this summary useful?
One click, anonymous. It tells us which summaries to re-run.
Related reading
Code-driven AI illustrations are more useful than images from dedicated image models
Code-driven AI illustrations let designers edit assets directly in code, saving time on iteration and ensuring consistency, which is a game-changer for teams that need rapid, reusable visual content.
A hierarchical note-taking app for building large personal knowledge bases
Trilium lets users build and navigate massive personal knowledge bases without duplicating content, saving time on organization and retrieval.
Desktop apps in Go with native UI or web frontend
Go developers can now ship cross-platform desktop and mobile apps in a single small binary without cgo or heavy runtimes, cutting build complexity and deployment size.
OpenBitFun: an agent workspace with four harness modes and phone remote control
OpenBitFun lets agents run on any machine and be controlled from a phone, eliminating the need to choose between local power and remote access, saving developers time switching contexts.
Intel One Mono: a monospaced font designed with low-vision developers
Developers with low vision or eye fatigue can read code more clearly, reducing errors and improving productivity.