Event ·Single source

Simon Willison 介绍外部沙箱模式:Agent 留在 Mac 上,命令进隔离环境

Simon Willison 在「External sandboxes for coding agents」一文中介绍一种沙箱模式:Claude Code、Codex、Pi 等 Coding Agent 继续在本机运行,但要执行的代码送入由 WebAssembly、QEMU 或 Apple Container 搭建的隔离 Linux 环境。团队比较了两种方案,一种把 Agent 放进沙箱(如 Fly 的 Sprites),另一种只把命令送进沙箱,他们选择后者,避免 Agent 改动自身环境,也让边界更容易审查。 文中开源了三套 Apache-2.0 许可的原型:基于 v86 在 WebAssembly 里模拟 Alpine Linux 的实现走 8686 端口,需 Node.js 22.19+;封装 Apple Containers 的走 8687;搭配 QEMU 的 Microsoft Quicksand 走 8688。接入深度各不相同:Codex 会把进程和文件系统操作(含应用补丁)送入沙箱,团队用模拟模型测试通过了 Codex CLI 0.164.0;Pi 1.5 及以上可通过扩展替换命令行、读写和搜索工具,扩展加载失败时内置工具会被关闭;Claude Code 只有 Bash 进入沙箱,原生读取和编辑仍在本机执行。 与 Claude Code 自动模式、Codex 自动审查这类依赖模型判断的机制相比,外部沙箱是一套不依赖模型判断的保护,对更便宜、更易受提示注入攻击的小模型尤其重要。默认无外网,加代理后可按主机和 HTTP 方法放行,并做凭证替换:沙箱内只有占位符,真实密钥留在主机代理中对 Agent 不可见。

Current read

Simon Willison 介绍了让 Claude Code、Codex、Pi 在本机跑,但代码进 WebAssembly/QEMU 沙箱执行的做法,三套原型已开源。比把 Agent 整个关进沙箱更灵活,比逐条人工批准更省事,天天用 Coding Agent 的开发者值得照着搭一套。

2 sources61° AI heatLast updated 2026/11/17 03:22:19

Evidence

2 sources
Related source 1Simon Willison
View source

Conflict check

Dedup data only shows that these sources discuss the same event, not that they agree. There is no structured supporting or refuting evidence yet, so no conflict is inferred automatically.

Simon Willison details external sandboxes for coding agents · 事件专题 | AITOP