Anthropic Sandbox Runtime (srt) is a lightweight sandboxing tool for imposing filesystem and network restrictions on arbitrary processes at the operating system level, without relying on containers. It uses native OS sandbox primitives (sandbox-exec on macOS, bubblewrap on Linux) as well as proxy-based network filtering, and can sandbox agents, local MCP servers, bash commands, and arbitrary processes. The tool is a research preview developed by Anthropic for Claude Code, released as open source, and its API and configuration format may change.
Main capabilities include: network restrictions (controlling accessible hosts/domains, supporting HTTP/HTTPS and other protocols), filesystem restrictions (controlling readable and writable files and directories), Unix socket restrictions, and, on macOS, real-time violation monitoring via system sandbox violation logs. The design follows secure-by-default principles: processes initially have only minimal permissions, and required permissions must be explicitly granted.
In terms of usage, srt can be used both as a CLI tool and as a library. CLI usage is the srt command wrapping an arbitrary command, for example srt --settings ~/.srt-settings.json <command>. The configuration file is located at ~/.srt-settings.json by default; if the file does not exist, built-in defaults are used: no network access, no writes outside the default write paths, and unrestricted reads; if the file exists but is empty, cannot be read, or fails validation, srt exits with an error rather than falling back to the defaults.
Filesystem isolation uses a read/write separation strategy: reads are allowed by default, and denyRead can be used to deny a broad path range and then allowRead can re-allow it, with allowRead taking precedence over denyRead; writes are all denied by default, and allowWrite must be explicit, with an empty allow list meaning no write permission. Network isolation denies all access by default, and domains must be explicitly allowed, with traffic forwarded through a proxy on the host.
Limitations: the tool is an early research preview, and the API and configuration format may evolve; different platforms use different implementation mechanisms; the control channel descriptor must be 3 or higher and readable; command ID keys compare only the first 100 characters; some behaviors have changed between versions (e.g., after 0.0.79, callbacks allow a connection only when true).