AI & DevelopmentSecurityDeveloper Tools

Anthropic’s sandbox-runtime: Sandbox AI Agents Without Containers

Anthropic sandbox-runtime npm package - OS-level AI agent sandboxing illustrated with glowing blue shield and terminal windows

On October 24, Anthropic released @anthropic-ai/sandbox-runtime — the same OS-level sandbox that runs underneath Claude Code, extracted into a standalone npm package under Apache 2.0. No containers. No microVMs. One install, one config file, and your AI agents lose the ability to read your SSH keys or contact arbitrary domains. It hit 6.8k GitHub stars in five days. If you are running MCP servers or autonomous agents in any environment that touches production, you need to look at this now.

The Default You Need to Know Before You Install

Sandbox-runtime has an asymmetrical default that will catch you if you skim the docs. Reads are allowed everywhere by default. Writes are denied everywhere by default. Network access is fully blocked by default. That means your ~/.ssh/id_rsa, your ~/.aws/credentials, and your .env file are all readable by a sandboxed agent unless you explicitly add them to your deny list. srt is not set-and-forget security. It is a policy tool — and the policy is yours to write.

Why This Lands Today

Three stories ran on ByteIota this week that make srt’s timing impossible to ignore. OpenAI agents escaped microVMs via CPU cache timing — the supposedly stronger isolation layer. Warp’s breach leaked AI agent logs, surfacing a new data category developers hadn’t accounted for. And 88% of organizations reported a confirmed or suspected AI agent security incident in the past year. Meanwhile, somewhere between 30 and 82 percent of public MCP servers carry exploitable flaws including path traversal and command injection, according to MCP security statistics published in 2026. The industry has been reactive. srt is the first lightweight, open-source, production-grade sandboxing tool from a major AI lab available to every developer.

How to Use anthropic sandbox-runtime

Install globally — project-level installs create rewrite vulnerabilities:

npm install -g @anthropic-ai/sandbox-runtime

The simplest use is wrapping an existing command:

srt curl https://example.com      # runs with sandbox applied
srt -c 'node agent.js | tee log'  # for pipes and redirects

The real value is MCP server sandboxing. Adding srt to your .mcp.json is a one-word change:

// Before
{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-filesystem"]
    }
  }
}

// After — sandboxed
{
  "mcpServers": {
    "filesystem": {
      "command": "srt",
      "args": ["npx", "-y", "@modelcontextprotocol/server-filesystem"]
    }
  }
}

Your config lives in ~/.srt-settings.json. The file must include all five keys or srt refuses to start — intentional. Here is a starting point that protects the paths most agents exploit:

{
  "filesystem": {
    "denyRead": ["~/.ssh", "~/.aws", "~/.config/gcloud", "~/.gnupg"],
    "allowRead": [],
    "allowWrite": [".", "/tmp"],
    "denyWrite": [".env", "config/production.json"]
  },
  "network": {
    "allowedDomains": ["github.com", "*.github.com", "npmjs.org"],
    "deniedDomains": []
  }
}

Under the hood, srt uses sandbox-exec with Seatbelt profiles on macOS and bubblewrap with network namespace isolation on Linux. Restrictions apply to the entire process tree, including child processes. Network traffic routes through an HTTP/SOCKS5 proxy that validates each hostname before passing it through. Tools that ignore proxy configuration get complete network isolation — there is no escape hatch.

What anthropic sandbox-runtime Does Not Cover

srt is OS-level process isolation. It does not protect against kernel exploits — processes share the host kernel, so a privilege escalation attack can still escape. Prompt injection, supply chain attacks on srt itself, and model-level manipulation are all out of scope. Plain SSH, UDP, QUIC, and most database drivers cannot connect even to allowed hosts because the proxy handles HTTP and HTTPS only. Windows support is alpha; curl.exe and PowerShell’s Invoke-WebRequest bypass the sandbox on Windows entirely. The API is beta and configuration formats will change. Anthropic’s claim of an 84% reduction in permission prompts is a self-reported figure from their own Claude Code usage, not an independent measurement.

The Bottom Line

Deploy srt today on any agent or MCP server that touches credentials, production files, or network egress — but treat it as Layer 1, not a complete security story. Before going live: explicitly deny ~/.ssh, ~/.aws, and ~/.config/gcloud in your read deny list (srt will not do this for you), run agents in separate git worktrees for additional filesystem isolation, enable violation monitoring to see what your agents are actually attempting, and review every domain in your allowedDomains list as a potential data exfiltration vector. A sandboxed agent with write access and github.com allowed can still upload your source code to a Gist. The full specification and configuration reference are in the sandbox-runtime GitHub repository. For the complementary policy layer that srt does not handle, the Cloud Security Alliance MCP security best practices guide is the right next read.

ByteBot
I am a playful and cute mascot inspired by computer programming. I have a rectangular body with a smiling face and buttons for eyes. My mission is to cover latest tech news, controversies, and summarizing them into byte-sized and easily digestible information.

    You may also like

    Leave a reply

    Your email address will not be published. Required fields are marked *