Agent sandboxing
Running a coding agent inside an isolated environment, such as a container, a dev container, a microVM or an operating-system sandbox, so that whatever command it runs can only reach the files, network destinations and credentials placed inside the boundary. Some agents ship a sandbox mode of their own; otherwise the team provides the environment.
Verdict: Strong containment for unattended and untrusted runs; it limits where an agent can act, not whether an action is right.
Who it suits
Teams that let agents run unattended or in auto-approve modes, open untrusted repositories, or run agents in CI and cloud environments, where a hard boundary around files, network and credentials matters more than judging each action.
ExamplesDev containers and Docker containers for agent sessions, gVisor or Firecracker microVMs, hosted sandboxes such as E2B, and the sandbox modes built into agents such as Claude Code and Codex
CostOpen-source runtimes such as Docker, dev containers, gVisor and Firecracker are free to run, with the compute and the engineering time to maintain images; hosted sandboxes price by usage: check each vendor's pricing page. Sandbox modes built into an agent come with that agent.
Pairs with
AI governance for coding agents, which decides each action inside the boundary and finds the agents running outside it; IAM and secrets controls for the credentials you place inside.
How it handles MCP connections- Discovery: Does not inventory MCP servers; it contains those started inside it.
- Control: Local (stdio) servers inside it get only its files and network; remote servers are reachable or not by egress allowlist, per domain, not per tool call.
- Record: Process and network logs, where the sandbox keeps them; not each MCP call.
What it covers of governing coding agents
The five jobs a coding agent program needs, as compared for every approach on the ranked guide.
| Job | Covered | How |
|---|---|---|
| Discover every agent, MCP server and skill | No | Knows only the sessions run inside it; agents, MCP servers and skills elsewhere stay unseen. |
| Decide each action before it runs | Partly | Denies files and network outside the boundary; allows anything inside it. |
| Warn in plain language where developers work | No | A denied read or blocked connection shows up as an error, not as why the action is risky. |
| Make the best engineer's habits the default | No | Out of scope. |
| Tie agent spend to shipped work | No | Out of scope. |
Strengths
- Contains damage: a wrong command only reaches what is inside the boundary
- Makes unattended and auto-approve runs safer, in a disposable environment
- Network egress allowlists stop data leaving for domains not on the list
- Enforced below the agent, so it does not depend on the agent following its own rules
Limits
- Allows anything inside the boundary: a destructive git command or a secret sent to an allowed domain still runs
- Covers only the sessions someone chose to sandbox; agents run outside it are not seen
- Every tool, credential and domain the work needs is added back by hand, and each exception widens the boundary
- Records containment events, such as a blocked connection, not each action and the decision on it
Scores, with reasons
Each criterion is scored 0 to 3 as defined on the criteria page.
| Criterion | Score | Why |
|---|---|---|
| Visibility | 1 | Sees only the sessions run inside it, as processes and connections; there is no inventory of the agents, MCP servers and skills on the fleet. |
| Enforcement | 2 | Denies file and network access outside the boundary before it happens, but allows any action inside it. |
| Developer friction | 2 | Built-in sandbox modes need little setup; containers and VMs need each repo's tools, credentials and allowed domains added back. |
| Coverage of terminal and MCP actions | 1 | Limits what a command or local MCP server can reach, without seeing the command or tool call as an agent action. |
| Audit evidence | 1 | Process and network logs, where the sandbox keeps them, record containment, not decisions on agent actions. |
| Deployment effort | 1 | Images, network rules and per-agent configuration to build and maintain for every repository and machine. |
| Total | 8/18 | Ranked #8 of 9. See the full table. |