AivexaNewsSearch
AI news for builders and product teamsChecked every hour

External sandboxes for coding agents

Collected Nov 17, 2026

Simon Willison, working with the AI research lab Prime Radiant, published work introducing an "external sandbox" pattern for coding agents and released three reference implementations of it. Willison describes the goal as making it safer to try local models without worrying that a mistake or a prompt injection attack could lead them to take damaging actions on a machine. He detailed the pattern on the Prime Radiant blog; the lab is also behind Superpowers and other projects.

The core idea is a split: the agent runs outside the sandbox, while any code it executes runs inside a dedicated sandbox. The agent reaches that sandbox through a localhost API, so execution is mediated rather than happening directly on the host machine. In practice, this means the agent process and the code it runs don't share a filesystem or environment by default, which is the main isolation benefit.

The three released servers differ in how the sandbox is built:

external-sandbox-v86 runs a Node.js server that uses v86 to run Alpine Linux inside WebAssembly. v86 is an emulator that implements a PC-compatible machine in the browser or in Node, so the Linux environment here is emulated rather than containerized.

external-sandbox-container is a Python web server that runs the sandbox in Alpine Linux inside an Apple Containers instance.

external-sandbox-quicksand is another Python web server, this one using Microsoft's Quicksand sandboxing library, which packages QEMU and Alpine Linux together as a Python package.

All three expose the same localhost API, so an agent tool can be pointed at whichever implementation is preferred without changing the integration. Willison names Pi, Claude Code and Codex as tools that can be configured to send API calls to the sandbox whenever they want to execute code.

The sandboxes also include an optional HTTP/HTTPS allow-list proxy, which lets you control exactly which hosts the agent's code is allowed to reach. There is also a credential replacement mechanism, intended to support authenticated API calls without handing a secret to the agent. Willison shows a UI for reconfiguring the proxy while the sandbox is still running.

A likely trade-off is overhead. Emulating a full Linux machine in WebAssembly, or bundling QEMU with Alpine, is heavier than running code directly, so start-up time and execution speed may lag a bare process. The upside is a stronger boundary: the agent cannot touch the host simply by running a bad command. Prompt injection remains relevant here, since an agent that reads hostile content could still try to act, but the external sandbox narrows what a successful injection can reach.

Why it matters: teams wiring coding agents into real workflows get a concrete, reusable way to separate what the agent decides from where its code runs. The shared API lowers the cost of swapping sandbox backends, and the allow-list proxy plus credential replacement address two common concerns, network reach and secret exposure. For developers experimenting with local models, this pattern is a practical template rather than a finished product, so expect to assemble and configure it yourself.

Read at Simon Willison

Based on reporting from the original publisher. Visit the source for full context and later updates.

Publisher excerpt

External sandboxes for coding agents I've been exploring new ways to sandbox code that is executed by agents, with a focus on making it safer to try out local models without worrying that a mistake or prompt injection attack might cause them to take damaging actions on a machine. I worked on this project with Prime Radiant , the AI research lab behind Superpowers and other projects . My post on the Prime Radiant blog introduces the external sandbox pattern, where code executed by the agent runs inside a dedicated s