Meet Anthropic’s sandbox-runtime: OS-Level Sandboxing for AI Agents, No Containers

2026年10月24日 11:12
站內 AI 整理稿

In this article, we will discuss newly trending open sourced Anthropic’s sandbox-runtime (srt), the OS-level sandbox behind Claude Code’s sandboxed bash tool.The Anthropic sandbox-runtime limits which files a process can touch and which hosts it can reach.

It does this without spinning up a container.It is also not tied to Claude Code.Your own agents, local MCP servers and plain command-line programs can run inside it.TL;DR Size: npm package @anthropic-ai/sandbox-runtime v0.0.81, about 11.4 MB unpacked, Apache-2.0, Node.js 22.12+.

Runs on: any macOS or Linux dev machine or CI box.macOS uses Seatbelt; Linux needs bubblewrap, socat and ripgrep.Windows is alpha.Performance: sandboxing cut Claude Code permission prompts by 84% in Anthropic’s internal usage (self-reported).

Best: 84% fewer permission prompts, with file and network limits enforced on the whole process tree.Worst: still a beta research preview, Windows support is alpha.What is Anthropic sandbox-runtime?

Anthropic sandbox-runtime is an open-source tool that wraps any process in filesystem and network restrictions.You install it with npm install -g @anthropic-ai/sandbox-runtime, then prefix a command with srt.It works as a CLI and as a TypeScript library.

How does sandbox-runtime work on macOS, Linux and Windows?srt uses each operating system’s own isolation primitives.Its restrictions cover the entire process tree, including scripts and subprocesses.macOS: sandbox-exec with dynamically generated Seatbelt profiles.Only ripgrep is required.

Linux: bubblewrap with the network namespace removed.It also needs socat and ripgrep.Windows (alpha): a dedicated srt-sandbox account, a Windows Filtering Platform egress fence and explicit file ACLs.Traffic leaves only through HTTP and SOCKS5 proxies running on the host.

On Linux, those proxies sit behind Unix sockets bind-mounted into the sandbox.On macOS, the Seatbelt profile allows only one localhost port.The proxies then apply your domain allowlist and denylist.Why does it need both filesystem and network isolation?

Anthropic team argues that 1 boundary without the other fails.Without network isolation, a prompt-injected agent could exfiltrate SSH keys.Without filesystem isolation, it could escape the sandbox and gain network access.srt’s defaults follow that logic.Reads are allowed everywhere unless denied.

Writes are denied everywhere unless allowed.Network access is denied unless a domain is allowlisted.How do you sandbox an MCP server or your own agent?For an MCP server, change the command in .mcp.json from npx to srt.Pass the original command as arguments.Rules then live in ~/.srt-settings.

json: Copy CodeCopiedUse a different Browser{ "network": { "allowedDomains": ["api.github.com", "*.npmjs.org"], "deniedDomains": [] }, "filesystem": { "denyRead": ["~/.ssh"], "allowWrite": ["."], "denyWrite": [".env"] } } For your own agent, the library exposes SandboxManager.

Call initialize(config) to start the proxies.Then wrapWithSandbox() returns a wrapped command string you can spawn.What does the 84% figure mean?Anthropic reports that sandboxing reduced permission prompts by 84% in internal Claude Code usage.

That is a self-reported number, not an external benchmark.The target is approval fatigue.Developers who click “approve” all day stop reading what they approve.A fixed boundary lets the agent work freely inside it and ask only at the edge.Back Next step Auto-play network.allowedDomains

anthropic.com *.npmjs.org github.com filesystem

denyRead: ~/.ssh denyWrite: .env srt "cat README.md" srt "cat ~/.ssh/id_rsa" srt "curl anthropic.com" srt "curl example.com" srt "npm install" srt "echo KEY=1 >> .env"

Pick a command. Toggle the config to see what changes. macOS

Supportedsandbox-exec

Seatbelt profiles

Needs ripgrep Linux

Supportedbubblewrap

No network namespace

socat + ripgrep Windows

Alphasrt-sandbox account

WFP egress fence

One-time install Read

Allow

Allowed everywhere by default. Deny regions like ~/.ssh, re-allow with allowRead. Write

Deny

Denied everywhere by default. Open paths like "." and /tmp with allowWrite. Network

Deny

No access by default. Every host must match allowedDomains. Claude Code permission prompts (indexed)

Without sandboxing100&

Related

相關文章

雷峰網生成式AI

拼多多緊急捐贈1000萬元 馳援西藏那曲抗震救災

本文作者: 徐咪 2026-10-24 11:40 導語:10月22日,西藏那曲市巴青縣發生7.0級地震,造成重大人員傷亡及房屋受損。國務院抗震救災指揮部辦公室、應急管理部將國家地震災害應急響應由四級提升至三級,各項救 10月22日,西藏那曲市巴青縣發生7.

11 小時前
智東西生成式AI

首部!國產AI超寫實電影上院線了

作者|王涵 編輯|心緣 10月24日報道,昨天,國內首部AI超寫實電影《三星堆:未來往事》正式登陸院線。據貓眼專業版App數據,上映首日,該影片首日票房30.15萬元,累計綜合票房40.1萬元。據燈塔專業版app數據,期預測總票房為207.8萬元。 對比來看,2026年8月5日上映的純手搓黑馬動畫電影《牛來》,其首日票房為3420萬元,最終累計綜合票房為6426.5萬元,市場表現較為懸殊。不過二者上映環境不同,《牛來》在暑期檔上映,大盤基礎更強。

14 小時前
何夕2077生成式AI

本期AI資訊彙總2026年10月24日的產品更新、前沿研究、行業趨勢與開源項目,幫助讀者快速瞭解當天的重要動態

導航SecureDoc // EncryptionActive本期AI資訊彙總2026年10月24日的產品更新、前沿研究、行業趨勢與開源項目,幫助讀者快速瞭解當天的重要動態。" AI資訊 | 每日早讀 | 全網數據聚合 | 前沿科學探索 | 行業自由發聲 | 開源創新力量 | AI與人類未來 | 訪問網頁版↗️ | 進群交流🤙 今日摘要 OpenAI訓練環境遭模型越獄被迫暫停訓練 Kimi K3.

14 小時前
何夕2077生成式AI

Kimi新模型逼近Claude旗艦

Ad Skip to content Chinese AI model Kimi K3.1 Pro is closing in on Anthropic's Claude Opus 5.5 Matthias Bastian View the LinkedIn Profile of Matthias Bastian Oct 23, 2026 Moonshot AI Key Points Chinese AI company Moonshot AI has released Kimi K3.

14 小時前
何夕2077生成式AI

Anthropic自曝未發佈模型

Ad Skip to content Anthropic says its unreleased model is both more capable and better aligned than Mythos 5.1 Matthias Bastian View the LinkedIn Profile of Matthias Bastian Oct 23, 2026 Anthropic has an internal model that outperforms Mythos 5.

14 小時前
何夕2077生成式AI

Claude測試越界攻擊真倉庫

Chapter 01: Alignment assessment summaryOn August 4, 2026, the UK AI Security Institute (AISI) published a report that detailed some concerning behavior it observed from Claude Mythos 5 during its testing of the model’s cyber capabilities.

14 小時前