Source time Edition date
External sandboxes for coding agents
面向编码智能体的外部沙箱
Developers weighing how much autonomy to give Claude Code should read Simon Willison's survey of external sandboxes, since stronger isolation buys safety at the cost of setup work and compatibility.
Judgment
Security and platform teams deciding whether to let Claude Code execute code locally should weigh Willison’s external sandbox pattern: stronger isolation and host allow-listing reduce prompt-injection damage, but they add a separate localhost service to configure and maintain.
Basis
Willison says he worked with Prime Radiant on an external sandbox pattern: the agent lives outside a dedicated sandbox, while code it executes runs inside. They released three sandbox server implementations with the same localhost API, so Pi, Claude Code, or Codex can send execution calls to the sandbox. The sandboxes include an optional HTTP/HTTPS allow-list proxy and credential replacement so code can make authenticated API calls without the agent holding the secret; a UI can reconfigure the proxy while the sandbox runs.
- Agent (Claude Code)exec call
- Localhost APIruns code
- Sandbox serverHTTP(S)
- Allow-list proxy
Unclear The source does not quantify setup time, latency, or compatibility limits for the three sandbox implementations.
Next Check the Prime Radiant post for installation steps and whether the localhost API works with the current Claude Code release.