{"slug": "external-sandboxes-for-coding-agents", "title": "External sandboxes for coding agents", "summary": "Prime Radiant, the AI research lab behind Superpowers, released three sandbox server implementations demonstrating an \"external sandbox\" pattern in which code run by a coding agent executes inside a dedicated sandbox while the agent itself lives outside it. All three implementations expose the same localhost API, letting users configure Pi, Claude Code, or Codex to route code-execution calls to the sandbox, and they include an optional HTTP/HTTPS allow-list proxy for controlling which hosts agent code can reach plus a credential replacement mechanism for making authenticated API calls without sharing a secret with the agent. The release targets the challenge of safely running untrusted code from coding agents.", "body_md": "[External sandboxes for coding agents](https://blog.primeradiant.com/external-sandboxes-for-coding-agents/)\n\nI worked on this project with [Prime Radiant](https://primeradiant.com), the AI research lab behind Superpowers and [other projects](https://github.com/orgs/prime-radiant-inc/repositories).\n\n[My post](https://blog.primeradiant.com/external-sandboxes-for-coding-agents/) 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.\n\nTo demonstrate this pattern we've released three sandbox server implementations:\n\nEach 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.\n\nThe 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:\n\nI 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.\n\nTags: [sandboxing](https://simonwillison.net/tags/sandboxing), [security](https://simonwillison.net/tags/security), [ai](https://simonwillison.net/tags/ai), [webassembly](https://simonwillison.net/tags/webassembly), [generative-ai](https://simonwillison.net/tags/generative-ai), [llms](https://simonwillison.net/tags/llms), [coding-agents](https://simonwillison.net/tags/coding-agents), [claude-code](https://simonwillison.net/tags/claude-code), [codex](https://simonwillison.net/tags/codex), [pi](https://simonwillison.net/tags/pi)", "url": "https://wpnews.pro/news/external-sandboxes-for-coding-agents", "canonical_source": "https://simonwillison.net/2026/Nov/17/external-sandboxes-for-coding-agents/", "published_at": "2026-11-17 22:52:29+00:00", "updated_at": "2026-11-17 23:09:42.267597+00:00", "lang": "en", "topics": ["ai-agents", "ai-safety", "ai-tools", "developer-tools"], "entities": ["Prime Radiant", "Superpowers", "Pi", "Claude Code", "Codex", "Simon Willison"], "also_reported_by": [], "takeaway": "Route coding-agent code execution to an external sandbox exposing a shared localhost API, and use its HTTP/HTTPS allow-list proxy with credential replacement so the agent never holds the secret.", "recommendation": null, "alternates": {"html": "https://wpnews.pro/news/external-sandboxes-for-coding-agents", "markdown": "https://wpnews.pro/news/external-sandboxes-for-coding-agents.md", "text": "https://wpnews.pro/news/external-sandboxes-for-coding-agents.txt", "jsonld": "https://wpnews.pro/news/external-sandboxes-for-coding-agents.jsonld"}}