Tuesday, 24 November 2026
1 agent hack today▬ 0 vs yesterday (1)

New sandbox pattern keeps coding agents away from your machine

Three open implementations let agents run generated code inside an isolated environment, with an optional allow-list proxy controlling which hosts that code can reach.

By The Agentic Times ·

A robot arm reaches toward a machine through a transparent barrier, with a gatekeeper statue deciding which doors it can touch.
A robot arm reaches toward a machine through a transparent barrier, with a gatekeeper statue deciding which doors it can touch. · Illustration: The Agentic Times

A new set of tools published on 17 November 2026 aims to stop code written by AI coding agents from damaging the machine it runs on. Developer Simon Willison, writing on his blog, said he worked on the project with Prime Radiant, the AI research lab behind Superpowers, and that the focus was on making it safer to try out local models without worrying that a mistake or a prompt injection attack might cause an agent to take damaging actions.

Prompt injection is an attack where instructions hidden in text or data an agent reads cause it to do something the user did not ask for. For a coding agent, which runs shell commands and scripts as part of its normal work, the consequences land directly on the developer's filesystem and network.

The approach Willison describes is what he and Prime Radiant call the external sandbox pattern. The agent itself runs outside the sandbox, as usual. Any code the agent wants to execute is sent into a dedicated sandbox and runs there instead. That inverts the more common arrangement of putting the whole agent inside a container.

Three sandbox server implementations have been released to demonstrate the idea. According to Willison, external-sandbox-v86 is a Node.js server that uses v86 to run Alpine Linux inside WebAssembly. external-sandbox-container is a Python web server that runs Alpine Linux inside an Apple Containers instance. external-sandbox-quicksand is also a Python web server, built on Microsoft's Quicksand sandboxing library, which bundles QEMU and Alpine Linux in a Python package.

All three expose the same API on localhost, Willison wrote. That means an agent can be pointed at whichever backend suits the machine it is running on without changing how it asks for code to be executed. He said Pi, Claude Code and Codex can each be configured to send API calls to the sandbox whenever they want to run code.

Two further controls are included. The sandboxes ship with an optional HTTP and HTTPS allow-list proxy, which according to Willison lets a user control exactly which hosts the agent's code is allowed to communicate with. That matters because exfiltration, where an attacker's injected instructions cause data to be sent to a server they control, depends on the code being able to reach that server. The proxy can be reconfigured through a user interface while the sandbox is still running.

The second control is a credential replacement mechanism. Willison said this allows authenticated API calls to be made without sharing a secret with the agent. In practice that means the sandbox holds the key and swaps it into outbound requests, so the agent never sees the raw value and cannot leak it.

Willison introduced the pattern in a post on the Prime Radiant blog and summarised it on his own site. He described the work as an experiment rather than a finished product, writing that he continues to be fascinated by the challenge of safely running untrusted code and that the external sandbox pattern provides a neat way to try different approaches.

The sources do not say how the implementations perform, how widely they have been tested, or whether any of the agent vendors named have endorsed the approach.

Sources

  1. simonwillison.nethttps://simonwillison.net/2026/Nov/17/external-sandboxes-for-coding-agents