subagentic.ai RSS X YouTube GitHub
AI-generated illustration

News

Prime Radiant’s external sandboxes leave Claude Code’s Read and Edit on the host

Prime Radiant’s prototype external sandboxes forward only Claude Code’s Bash tool into a Linux guest, while native Read and Edit stay on the host.

sandboxclaude-codecodexpi

Prime Radiant’s external-sandbox prototypes keep a coding agent on the Mac and send the commands it generates into a separate Linux guest. The confinement is not uniform. Claude Code sends only its Bash tool into the sandbox. Its native Read and Edit tools still run on the host, so the mount rules that limit Bash do not stop Claude from reading and editing files on the Mac directly.

That is the boundary that matters. Codex sends process and filesystem operations, including native apply_patch. Pi sends bash, read, write, edit, grep, find, and ls. Of the three connectors in the post, only Claude Code leaves its file tools outside the guest.

The Prime Radiant post calls the pattern external sandboxes because the sandbox is external to the agent, not to the computer. Both can run on the same machine. Simon Willison described that arrangement on November 17, 2026: agents run on the Mac and execute code in a WebAssembly, QEMU, or Apple Container sandbox, with demos for Claude Code, Codex, and Pi.

Three guests, one protocol

The post presents three prototype servers. They implement the same localhost web API, so an agent can be pointed at any of them.

  • external-sandbox-v86 is a Node.js process that runs Alpine Linux inside v86, an x86 emulator compiled to WebAssembly. The npm package bundles that distribution. The try-it instructions require Node.js 22.19 or later. The server defaults to port 8686.
  • external-sandbox-container is a Python wrapper around Apple Containers running Linux, published on PyPI and started with uvx. It uses port 8687 and, the post says, an Apple silicon Mac with Apple’s container CLI.
  • external-sandbox-quicksand is a Python process that runs a QEMU virtual machine through Microsoft’s Quicksand. QEMU and the Alpine image arrive as Python wheels, so there is nothing else to install. It uses port 8688, also on Apple silicon. The first run caches the image.

The different ports mean all three can run side by side. Each example mounts the current directory read-write at /mnt/project and, with --preserve-paths, at the original host path too, so commands that mention host paths still resolve. --mount-ro adds read-only folders. Opening the server port in a browser shows a terminal and the network-rules UI. The /proxy page itself appears only if the server was started with --proxy or --proxy-config.

A specification and a conformance tool live in the external-sandbox repository at github.com/prime-radiant-inc/external-sandbox.

A boundary that does not depend on the model

The post’s case is that anything coding agents can read or edit might be damaged or compromised, and that approving every action is slow enough to produce decision fatigue. Anthropic’s auto mode and Codex’s auto-review add further model checks, but those are features of those products and still depend on a model judging each action correctly. A sandbox does not. The post says that matters especially for less expensive models and models that run locally, which it calls more prone to mistakes and easier victims of prompt injection.

Running the agent inside the sandbox — the approach used by Fly’s Sprites — was considered and set aside. Keeping the agent outside avoids the agent modifying itself or its immediate environment, and makes the boundary easier to audit.

Network access is denied by default, framed as protection against bugs or prompt injection that could leak private data. An optional HTTP/HTTPS proxy allow-lists hosts and methods. It can also replace credentials: the guest holds a placeholder, and the host-side proxy inserts a secret such as GITHUB_TOKEN, so the key is not visible to the agent or present inside the sandbox. An allowed host could still echo a credential back, so the post says to use those rules only with services you trust, and to keep methods and paths narrow. Code that ignores the proxy settings and connects directly is still blocked.

The connectors are not equivalent

Claude Code’s mechanism is the CLAUDE_CODE_SHELL_PREFIX environment variable. Bash commands are prefixed with a shell script from the external-sandbox repo and forwarded to the sandbox API. Read and Edit never take that path. The documented setup also sets EXTERNAL_SANDBOX_API_URL and a temporary directory that must sit inside the writable mount, because Claude Code uses it for its own bookkeeping.

Codex talks to a JSON-RPC exec-server over a WebSocket. In the v86 example the URL is ws://127.0.0.1:8686/codex, set in a dedicated environments.toml. The launch line includes --sandbox danger-full-access, which tells Codex not to layer its own sandbox inside this one. The post says automated tests pass against Codex CLI 0.164.0, using codex exec and a simulated model. The exec-server protocol is experimental, so other versions may need checking.

Pi loads the external-sandbox-pi extension with --no-builtin-tools, so a failed extension load does not leave host tools in place. The extension needs Pi 1.5 or later. If the sandbox cannot be reached, the tools return an error rather than falling back. grep and find need ripgrep in the guest; all three default images include it. The post’s check is !uname -a: the demo prints an Alpine kernel, Linux (none) 6.12.114-0-virt, not Darwin.

Prototypes, not a security audit

The post says these sandboxes should still be considered experimental prototypes. They demonstrate the pattern, but they have not been audited to a level you should trust with sensitive workloads. A read-write mount can still be damaged, so keep that folder under version control and use read-only mounts where you can. The guests are Linux, so macOS-built dependencies such as a project node_modules or .venv may need to be reinstalled inside the sandbox.

If you want to see the split yourself, follow the Prime Radiant post’s two-command Pi demo against external-sandbox-v86 on a project you can afford to rewrite, and confirm !uname -a reports Linux. For Claude Code, read the shell-prefix steps and assume Read and Edit still touch the host.

Sources