External sandboxes for coding agents

The AI Signal

The AI Signal

AI and technology, explained in conversation.

External sandboxes for coding agents

Published 18 November 2026 · AI-generated hosts

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 sandbox while the agent itself lives outside of that sandbox. To demonstrate this pattern we've released three sandbox server implementations: external-sandbox-v86 runs a Node.js server which then uses v86 to run Alpine Linux inside WebAssembly. external-sandbox-container is a Python web server which runs the sandbox in Alpine Linux inside an Apple Containers instance. external-sandbox-quicksand is another Python web server, this time using Microsoft's Quicksand sandboxing library, which bundles QEMU and Alpine Linux in a Python package! Each of these implementations offers the same localhost API. You can then configure Pi, Claude Code, or Codex to send API calls to that sandbox any time they want to execute code. The sandboxes also include an optional HTTP/HTTPS allow-list proxy, so you can control exactly which hosts your agent's code is allowed to communicate with - plus a credential replacement mechanism to make authenticated API calls without sharing a secret with the agent. Here's the UI you can use to reconfigure that proxy while the sandbox is still running: I continue to be fascinated by the challenge of safely running untrusted code. This external sandbox pattern provides a neat way to experiment with different approaches. Tags: sandboxing , security , ai , webassembly , generative-ai , llms , coding-agents , claude-code , codex , pi

Transcript

Mara A coding agent that can run commands on your laptop can also make a mistake on your laptop, or get tricked by a prompt injection into doing something damaging. On November 17, Simon Willison published a project aimed at that problem: external sandboxes for coding agents, built with Prime Radiant, the AI research lab behind Superpowers.

Mara The core idea is what he calls the external sandbox pattern. Instead of running the whole agent inside a sandbox, the agent lives outside it, and only the code it executes runs inside a dedicated sandbox. His stated focus is making it safer to try out local models without worrying about damaging actions on your machine.

Mara To demonstrate it, they released three sandbox servers. One, external-sandbox-v86, is a Node.js server that uses v86 to run Alpine Linux inside WebAssembly. Another, external-sandbox-container, is a Python web server that runs Alpine Linux inside an Apple Containers instance. The third, external-sandbox-quicksand, is also a Python server, using Microsoft's Quicksand library, which bundles QEMU and Alpine Linux in a Python package.

Mara All three expose the same localhost API. That matters because you can point Pi, Claude Code, or Codex at the sandbox whenever they want to execute code, and swap the underlying isolation approach without changing how the agent talks to it.

Mara The sandboxes also include an optional HTTP and HTTPS allow-list proxy, so you can control exactly which hosts the agent's code may contact. There's a credential replacement mechanism too, meant to let the code make authenticated API calls without the agent ever being given the secret. And there's a UI for reconfiguring the proxy while the sandbox is still running.

Mara What's still open is how well each backend holds up in practice; the post presents these as demonstrations of a pattern, and Willison describes it as a neat way to experiment with different approaches to safely running untrusted code. The practical takeaway: if you run coding agents locally, the question to ask is not just which model, but where its code actually executes and what network it can reach.

Sources