Who it is forSomeone letting an agent run shell commands who wants a hard stop on reading ~/.ssh or sending data out.
The problemWithout file and network isolation, one bad command can read SSH keys and send them anywhere.
The outcomeCommands that work in the project folder but fail on denied files and on any domain you did not allow.
What you need first
- Node.js and npm to install the CLI
- macOS, Linux with bubblewrap, or Windows
- Optional: a settings file at ~/.srt-settings.json; without one srt uses built-in defaults
Steps
- Install with
npm install -g @anthropic-ai/sandbox-runtime - Try it:
srt "curl example.com"is blocked by the network allowlist, while reads in the current directory work - Add the hosts a task really needs to network.allowedDomains in ~/.srt-settings.json, since network access is denied by default
- Deny sensitive files with denyRead, for example a pattern for .env files, and allow writes only where needed
- Run a real task with a specific config:
srt --settings /path/to/srt-settings.json npm install
Prompt for your agent
Using anthropics/sandbox-runtime, write an srt settings file for <project> that allows network only to <domains>, denies reads of ~/.ssh and **/.env, and allows writes only to the project folder. Run <command> under it with `srt --settings` and report anything that was blocked.
Caveat. Reads are allowed everywhere by default and writes are denied, so you must add denyRead rules yourself; the Windows filters also have known limitations listed in the README.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for anthropics/sandbox-runtime and "Keep agent shell commands away from your SSH keys"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer