External Sandbox moves coding-agent tools into Linux, with different limits for Claude, Codex and Pi
Prime Radiant's External Sandbox project lets a coding agent keep running on your computer while its commands execute in a separate Linux environment. You choose the folders the guest can see and the network destinations it can reach. There are adapters for Claude Code, Codex and Pi, though they move different parts of the agent's work across that boundary. The authors describe the implementations as prototypes.
With Claude Code, Bash goes into the guest; native Read and Edit still operate on the host. With Codex, the integration also routes the executor's filesystem operations, including native patches. Pi gets replacement tools for shell commands and file access.
The agent stays where it is
The project's shared protocol gives clients HTTP and WebSocket interfaces for execution and file operations. Three implementations sit behind it:
| Backend | How it runs Linux |
|---|---|
| external-sandbox-v86 | v86, an x86 emulator running through WebAssembly, with a Node.js server |
| external-sandbox-container | Apple Container, with a Python server |
| external-sandbox-quicksand | A Quicksand QEMU virtual machine, with a Python server |
A shared browser interface provides a terminal and network-policy editor. The agent's model connection remains on the host, so changing the guest does not require installing the whole agent inside it.
The mounts are live. Give the guest a writable project folder and its edits change your actual checkout immediately. Other directories can be mounted read-only. This is useful for running tests against the files you are editing, but there is no disposable copy waiting to absorb a bad deletion. Version control still has work to do.
There is also a fairly ordinary Linux migration problem hiding in the setup. Dependencies installed for macOS may need installing again inside Linux. The default v86 image is 32-bit Alpine with Bash, Python, Git and ripgrep; it does not include Node or npm. Node starts the sandbox server on the host. A JavaScript project does not thereby acquire a working guest-side build environment.
Three adapters, three scopes
The Claude Code adapter uses CLAUDE_CODE_SHELL_PREFIX. Its wrapper forwards Claude's complete command to the guest without evaluating it locally. Preserving the project's absolute path avoids breaking paths embedded in those commands, and Claude's temporary directory must sit inside the writable mount.
The adapter leaves native file-tool permissions alone. If the reason for using a guest is to keep Claude away from host files, moving Bash alone does not accomplish that.
The Codex setup uses its experimental exec-server interface. Process and filesystem requests go through the backend, where mount permissions also apply to native apply_patch. The instructions describe a configuration tested with Codex CLI 0.164.0 and explicitly require compatibility checks for newer versions. Host extensions and Codex's authentication remain on the host.
Pi's extension replaces bash, read, write, edit, grep, find and ls, as well as the user's ! and !! shell shortcuts. Its launch recipe disables built-in tools so a failed extension load does not leave local tools available. An unreachable sandbox produces an error. Other extensions still run host-side code; replacing their callable tools does not contain the extensions themselves.
Letting a command reach the internet
Networking is disabled by default. The managed proxy can permit particular origins, with narrower method and path rules, so fetching a dependency need not mean granting unrestricted outbound access.
The v86 proxy implementation enforces this below the guest's proxy environment variables: changing those variables does not open another route out. It can also substitute a host-held credential for a placeholder in an approved HTTPS request. A command can call the service without receiving the real API key.
That still gives the command authority to use the account. The proxy does not impose spending limits, and a permitted upstream that returns credentials could leak them. The documentation treats response redaction as an additional precaution and warns against trusting it to catch transformed secrets.
Comments
No comments yet. Be the first.