A sandbox limits what an agent can touch even after it has been tricked: which directories it can write and which hosts it can reach. Filesystem isolation stops tampering with credentials and config, while network allow lists stop quiet exfiltration. Pair OS-level sandboxes or dev containers with an egress proxy so approvals become the exception instead of the norm.
Read in this order
- ArticleMaking Claude Code safer with sandboxing (Anthropic)Start here: why filesystem and network isolation work together.
- Open sourcesandbox-runtime (Anthropic, open source)Hands on: run a harmless process under file and network limits, then compare what gets denied.
- ArticlePrompt injection to RCE in AI agents (Trail of Bits)Real attacks that a sandbox would have contained.