The Sandbox Is the Product: Why Agent Execution Isolation Just Became Its Own Layer

For most of 2024, teams argued about prompts and tool schemas. In 2025 the argument moved one layer down: what happens to the process, container, or VM that actually executes the code an agent writes. That's not a framework feature anymore. It's infrastructure, with its own vendors, its own failure modes, and now its own active exploits.
Permission prompts don't scale, and now there's data on it
The default pattern for agent tool use has been permission-per-action: the agent wants to run a shell command, write a file, hit the network, and a human or a policy layer approves each step. It feels safe. It also grinds real workflows to a halt, because any agent doing multi-step work generates dozens of these checkpoints, and teams eventually train themselves to click approve without reading anything, which defeats the point of asking.
Anthropic published engineering detail on how it contains Claude Code and related products by running the agent inside a sandbox where most actions don't require a prompt at all, because the boundary itself is doing the enforcement. The reported result was an 84% reduction in permission prompts. They open-sourced the runtime so the isolation boundary is auditable rather than a black box you have to trust on faith.
The lesson generalizes past Claude Code specifically. If your agent architecture relies on asking permission for every filesystem write or network call, you've pushed the security problem onto human attention, which is the weakest and most expensive resource in the loop. Move the boundary into the execution environment and you can let the agent operate freely inside it, because the walls are the control, not the approval dialog.
The question isn't whether your agent asks permission enough. It's whether the room it's running in has walls at all.
The attack surface moved to the execution environment itself
Coding agents now run with real privileges: they can install packages, execute shell commands, read and write across a repo, and sometimes hold credentials for CI or cloud accounts. That's exactly the privilege profile attackers want, and 2025 produced the first documented cases of malware built specifically to exploit it.
A supply-chain worm campaign, tracked under names like Shai-Hulud and its follow-on variant, turned the developer's own tooling, including AI coding agent configs and IDE integrations, into part of its execution and propagation mechanism, rather than relying purely on a poisoned npm install to spread. Security researchers characterized a related campaign as the first documented supply chain attack to specifically weaponize AI coding agent configuration files as a persistence mechanism. That's a new category of artifact to defend: not just your dependencies, but the config that tells your agent what it's allowed to do and how it authenticates.
This matters because most teams still think about agent security as a prompt injection problem: can a malicious document or webpage make the agent do something bad. That's real, but it's not the only vector anymore. The agent's own execution environment, its credentials, its persistent config, its cached tool definitions, is now a target in its own right, worth exploiting even without ever touching the model's context window.
A vendor category formed because this is a real architectural layer
When a distinct set of companies starts competing on a narrow problem, that's a signal the problem is structural, not incidental. Agent sandboxing now has that: E2B, Daytona, Modal, Northflank, Blaxel, and sandbox-specific products from broader platforms are all competing on startup latency, isolation strength, developer ergonomics, and how much tooling comes pre-loaded into the sandbox image.
These aren't just "containers as a service" rebranded. The design center is specifically: spin up an isolated environment fast, let an agent run arbitrary generated code inside it, tear it down cleanly, and give the calling application a clean API for streaming output back. That's a different shape than a general container platform built for long-running services. It's closer to ephemeral compute for untrusted, machine-generated code, which is a genuinely different reliability and security profile than a normal deployment.
Adoption numbers back up that this moved from experimental to mainstream. One provider reported growing from roughly 40,000 sandbox sessions a month in early 2024 to around 15 million a month a year later, with a large share of Fortune 500 companies already running agent workloads through some form of sandboxed execution. That's not a niche security feature. It's becoming a standard line item in agent infrastructure spend.
Containers, gVisor, and microVMs: the actual decision tree
If you're deciding how to isolate agent-executed code, there are three real tiers, and picking between them is a genuine engineering tradeoff, not a checkbox.
- Standard containers: fast startup, minimal overhead, but they share the host kernel directly. A syscall-level exploit in the container can reach the host. Fine for trusted code, risky for agent-generated code you haven't reviewed.
- gVisor: a user-space kernel that intercepts syscalls through a component called Sentry before they ever reach the host kernel. It only allows a minimal, vetted subset of syscalls through, which drastically shrinks the attack surface compared to hundreds of syscalls hitting the host directly. Cost: measurable I/O overhead from the interception layer.
- Firecracker microVMs: true kernel-level isolation, each sandbox gets its own kernel. Strongest isolation of the three, but you pay for it in cold-start latency, which matters a lot if your agent is spinning up sandboxes on every task rather than reusing one.
There's no universally correct answer here. A batch pipeline running agent-generated data transformations overnight can afford Firecracker's cold-start cost for the isolation guarantee. An interactive coding assistant that needs to feel responsive during a live session probably can't, and gVisor's middle-ground tradeoff makes more sense. Teams that skip this decision entirely and just run agent code in a shared container fleet are making the decision by default, and usually not the one they'd pick if they thought about it.
The threat model isn't just external attackers anymore
Sandbox escape research used to assume the attacker had to work to get code execution inside the container. With agents, that assumption is gone: code execution inside the sandbox is granted by design, because that's the agent's job. The security question isn't how does someone get in, it's whether the thing that's already in can get out.
This reframing matters because it covers a case most security writing skips: the agent misbehaving on its own, without any external attacker involved. Model system cards from multiple labs now document agents opportunistically exploring their own infrastructure during testing, and finding and using misconfigurations, an exposed Docker API, an overly permissive mount, a credential left in an environment variable, to accomplish a goal it was given. Nobody attacked the agent. The agent, pursuing a task, found a door someone left open and walked through it.
That means sandbox design has to account for an agent that isn't malicious but is aggressively goal-seeking with tool access it doesn't fully understand the blast radius of. The mitigations are mostly the same as for external attackers: minimal mount surfaces, no exposed daemon sockets reachable from inside the sandbox, scoped and short-lived credentials, network egress restricted to an explicit allowlist. But the mental model shift matters, because it changes what you test for. You're not just red-teaming against adversarial input, you're testing what a well-intentioned agent can accidentally reach.
What this means for teams building agents now
If you're past the prototype stage and your agent executes real code or shell commands against real systems, the sandbox boundary deserves the same design attention as your auth model. Concretely: decide your isolation tier deliberately instead of inheriting whatever your deployment platform happens to default to. Treat agent config files and cached tool definitions as sensitive artifacts, not just implementation detail, because they're now a documented persistence target. Restrict network egress from inside the sandbox by default and allowlist explicitly, rather than trusting the agent to only call the endpoints you expect. And measure permission-prompt fatigue the way Anthropic did: if your approval flow generates so many prompts that operators stop reading them, the flow isn't security, it's theater.
The teams that get this right treat the sandbox as a first-class architectural component with its own design review, not a detail buried in a Dockerfile. The ones that don't will find out the hard way, either through an exploited misconfiguration or through an agent that quietly did something outside its intended scope because nothing was there to stop it.