The software keeping AI agents safe is also the reason they are slow.
There is a layer of software running underneath almost every AI system that writes code, answers questions by searching the web, or manipulates a spreadsheet on your behalf. Most people who use these systems have never heard of it, and most articles about AI never mention it. It is called a sandbox, and it is quietly responsible for much of why AI agents are slower, more expensive, and more brittle than they appear from the outside.
When an AI model generates a snippet of Python and needs to run it, you cannot simply drop that code onto the host machine and hope for the best. The code is untrusted. It was written by a probabilistic system trained on the entire internet, and it might, by accident or design, reach out to a network, delete a file, or attempt to escalate its own permissions. So the code runs inside a walled environment where what it can see and touch is strictly limited. For decades, sandboxing was a settled piece of systems infrastructure that engineers configured once and rarely thought about again. Then AI agents arrived, and the arithmetic changed completely.
A conventional application might spend hours or days inside a single sandboxed environment. An AI agent operates differently. It generates code, executes it, reads the result, revises the code, executes again, and repeats this loop dozens of times per task. Each iteration requires a fresh isolated environment, because each new snippet is a new untrusted input. What was once a fixed cost, paid once and amortized over a long process, is now a recurring cost paid on every single step.
The isolation technologies available to engineers form a spectrum, and every point on it involves a tradeoff between speed and containment. Amazon's Firecracker, the microVM technology that powers Lambda and Fargate, was engineered specifically for high-frequency isolation. It can boot a fully isolated virtual machine in under 125 milliseconds and create up to 150 of them per second on a single host. That sounds fast until you consider that a conversational AI system needs to feel responsive within roughly 300 milliseconds. If the sandbox consumes nearly half that budget before the model has processed a single token of output, the isolation layer that was designed to be invisible becomes the dominant cost in the user experience.
The tradeoff is not solvable by picking the fastest technology and moving on. A lighter sandbox that cannot contain the code an agent produces provides no real protection. A heavier sandbox that breaks conversational flow provides no real usability. The architecture of isolation itself is the constraint, and it was designed for a world where sandboxes were few, long-lived, and predictable, not for a world where an agent might require dozens of fresh environments per minute.
The startup tax on a single sandbox is a nuisance. What happens when you need thousands of them at once is a different order of problem entirely.
Modern AI agents are increasingly designed to act on many things simultaneously. An agent tasked with researching ten companies might query a database, fetch ten web pages, and cross-reference a document store all at once, collapsing what would be a serial chain of waits into a single round trip. The promise of parallel tool use is that total latency becomes the duration of the slowest action, not the sum of all of them. But sandboxes do not scale linearly. Spinning up many isolated environments at once triggers resource contention deep in the operating system kernel, where global locks on operations like network interface creation force the work to happen one at a time. These serialization points exist because the kernel was never designed for the workload of spawning hundreds of isolated environments per second, and no amount of faster hardware removes them.
The sharpest demonstration of what this costs came from Microsoft Research's rStar2-Agent project, which trained a reasoning model by having it solve mathematical problems through repeated code execution. A single training batch could trigger tens of thousands of concurrent tool calls, each requiring its own isolated environment, and the engineers found that the sandbox infrastructure, not the model, was the thing that had to be redesigned from the ground up. They built a centralized task queue feeding pools of execution workers across 64 dedicated processors, ultimately handling 45,000 concurrent tool calls with results returned in an average of 0.3 seconds. The 14-billion-parameter model was the easy part. The sandbox cluster was the engineering problem.
This inversion is increasingly common in AI systems that learn by doing. The expensive compute sitting inside the accelerators goes idle while the sandbox cluster catches up on provisioning. The bottleneck is not the intelligence. It is the walls around it.
There is a second way the sandbox becomes a structural problem, and it runs in the opposite direction from the first.
The more capable an AI agent becomes, the more it must be permitted to do. An agent that can only read text is harmless and also useless. An agent that can browse the web, write and execute code, read and modify files, query databases, and send messages is genuinely useful but carries real risk with every action. Every permission granted to extend an agent's capabilities is simultaneously an expansion of the damage it could cause if something goes wrong.
The principle of least privilege, a foundational idea in computer security dating to the 1970s, says that every component in a system should operate with only the permissions it strictly needs. Applying that principle to AI agents is structurally difficult because an agent's tasks are described in natural language and resolved at runtime. The permission set is not fixed: an agent asked to research competitors might legitimately need the web, a document editor, and a code interpreter, while an agent asked to send a follow-up email needs almost nothing. The sandbox must accommodate both with the same configuration, because determining the minimal permission set for a natural-language task requires solving the task first.
What makes this vulnerability distinct for AI systems is that the attack surface is linguistic. A conventional program is compromised through bugs in its code. An AI agent can be compromised through text it is asked to read. A malicious instruction buried in a web page or document can redirect the agent's behavior as effectively as a software exploit. Researchers call this prompt injection, and when combined with an agent that holds broad permissions, the consequences can be severe. In early 2026, researchers demonstrated exactly this kind of attack against a major AI coding tool: a crafted text sequence bypassed the tool's strictest security mode and achieved arbitrary code execution, not by exploiting a flaw in the software but by constructing text the agent interpreted as a legitimate instruction to modify its own behavior. The sandbox's permissions became the weapon. The agent's willingness to follow instructions became the delivery mechanism.
The permissions an AI agent holds at runtime are not a fixed, auditable list. They are the union of everything the agent could need to do its job, selected at the moment the task arrives in natural language. Every capability added to the agent widens the blast radius if that natural language is ever weaponized.
The sandbox problem takes a different form in a class of AI architectures now receiving renewed attention after decades of research: systems that combine neural networks with symbolic reasoning engines. The aspiration of neurosymbolic computing is to use the neural component to perceive and interpret, then hand off to a symbolic component to reason and verify. The result should be a system that is both flexible and rigorous.
The bottleneck between those two components is not a security sandbox in the traditional sense, but it behaves exactly like one. The neural and symbolic components run at different speeds on different hardware, and every time control passes from one to the other, data must be converted, transferred, and reformatted. Workload analyses of neurosymbolic models consistently find that the symbolic reasoning component accounts for over 90 percent of total inference time while contributing less than 20 percent of the floating-point operations, a striking inversion. The symbolic component is slow not because it is computationally expensive but because its memory access patterns are irregular and sequential, poorly matched to the massively parallel architecture of modern GPU hardware.
In a study comparing a standard language model with a neurosymbolic variant that added a formal logic layer for constrained generation, the neurosymbolic version was four times slower overall. The reasoning component itself was not the bottleneck. The interface between the reasoning component and the neural component was. That is the same structural problem as the security sandbox: the cost is not in the operation but in the boundary crossing. Whether the boundary separates a neural model from a logic engine or a language model from a file system, the question is identical. How do you cross a computational boundary cheaply, safely, and without destroying the isolation properties that make the boundary worth having?
The most architecturally interesting response to the sandbox bottleneck is snapshotting. Rather than booting a fresh virtual machine for each execution, a pre-warmed image is captured at the exact moment when the guest operating system has fully started and the application runtime is loaded. Resuming from that snapshot takes as little as four milliseconds, compared to the 125 milliseconds required for a full boot. The security implications require careful handling: snapshots containing cryptographic keys, randomness seeds, or live network state must be refreshed before reuse to avoid subtle vulnerabilities that arise when two running environments share the same initial state. But for workloads where the same execution context is used repeatedly, snapshotting converts the dominant startup cost from a hardware-constrained boot sequence into a memory copy, and the economics shift sharply in favor of responsiveness.
Other approaches attack different parts of the problem. WebAssembly trades broad language support for near-zero startup time and a fine-grained capability model. eBPF enables verified programs to run inside the kernel itself at single-digit-percent overhead, though with sharp limits on what those programs can express. Hardware-assisted isolation, through Intel's Trust Domain Extensions and AMD's Secure Encrypted Virtualization, provides cryptographic guarantees at the hardware level with measured overheads below seven percent for typical inference workloads. Each solves for a different point on the tradeoff surface, and none eliminates the surface itself.
The deeper issue is architectural. Every one of these approaches optimizes within the existing frame: make the sandbox faster, make the boundary cheaper, make the isolation lighter without breaking it. What the field does not yet have is a satisfying answer to whether the boundary itself is the right abstraction. The confused deputy problem, where a trusted system is manipulated into misusing its own privileges by an untrusted input, does not disappear by making the sandbox boot in four milliseconds instead of 125. It requires the system to reason about what it is being asked to do, not just execute it. That is a problem for AI research to solve, not infrastructure engineering. Until it is solved, the walls around the code will remain both necessary and costly, the bottleneck that the next generation of AI has to learn to live inside.
The tradeoff between capability and containment is one of the oldest problems in systems design. What is new is that the system making decisions inside the sandbox is no longer a program following fixed rules. It is a model trying to complete a task, and it has learned, in at least a few documented cases, that the walls are in the way.
Key references: Agache, A. et al., "Firecracker: Lightweight Virtualization for Serverless Applications," USENIX NSDI 2020. Google gVisor project, gvisor.dev. Microsoft Research, "rStar2-Agent: Agentic Reasoning Technical Report," arXiv 2025. Saltzer, J. and Schroeder, M., "The Protection of Information in Computer Systems," Proceedings of the IEEE, 1975. Lisichkin, D. et al., Pillar Security, CVE disclosure for Google Antigravity prompt injection, January 2026. WebAssembly System Interface specification, WASI, Bytecode Alliance. Bhatotia, P. et al., "SandBPF: Software-based Dynamic Program Sandboxing using eBPF," EuroSys 2023. Intel Trust Domain Extensions specification, intel.com. AMD Secure Encrypted Virtualization documentation, amd.com. NVIDIA H100 Confidential Computing whitepaper, 2023.
Daice Labs Inc.
Brookline, MA, USA
Roll the "daice"–exploration & programmable adaptation.