Runtime Isolation Options for Untrusted AI Agents Ranked by Blast Radius
Ranking isolation methods by how much damage a compromised AI agent can actually cause.

Firecracker micro-VM isolation for AI agents gives each workload its own kernel behind a hardware virtualization boundary, rather than sharing the host kernel as standard containers do. This ranking compares runtime isolation options by the harms a compromised agent can cause. The right choice keeps failures within the limits the threat model allows, and explicit permissions set what the agent can still do inside its sandbox.
The five categories of harm an untrusted agent can cause
An untrusted agent can cause five distinct categories of harm. Filesystem access outside its intended scope exposes.env files, SSH keys, and parent-directory source files, or permits unauthorized writes. Unrestricted network egress enables data exfiltration, attacker instructions, and unauthorized API calls. Access to host kernel syscalls gives a compromised workload a way to attack the host and neighboring tenants. Cross-tenant leakage exposes another user's data, while secret exfiltration targets environment variables, /proc, and credential files. These harms overlap, but their containment requirements differ.
Indirect prompt injection can lead to all five kinds of harm. Johann Rehberger's ZombAIs demonstration used a malicious webpage to steer Claude Computer Use through a visible injected instruction, a binary download, execution, and host compromise. The binary-based chain succeeded on its first attempt after earlier failed bash-based approaches. The agent used permissions it already possessed. A prompt is therefore not an enforceable security boundary, and this sixth category is the one no sandbox tier fully eliminates.
Why blast radius, not security theater, is the right evaluative frame
An agent chooses actions at runtime, so part of its program is generated while it runs. Pre-deployment analysis consequently catches less than it would for deterministic software. Sandboxing begins where that assurance runs out. Its purpose is to limit how far damage propagates after a compromise.
The absence of perfect safety does not make ranking pointless. Destroying one disposable VM and exposing a shared host with neighboring tenants are materially different outcomes. A safe-or-unsafe label obscures that distinction, while a blast-radius assessment names the resources still reachable after failure. Developers should map their threat model against those reachable resources, then choose the tier that contains the harms they most need to contain.
Tier 1 — OS process sandboxes: blast radius spans the host kernel
OS process sandboxes apply syscall filtering and filesystem restrictions to a process without giving it a separate kernel. Seatbelt on macOS and bubblewrap on Linux/WSL2 are lightweight examples. The host kernel remains the common boundary. These mechanisms can restrict a process's access, but they do not provide hardware separation from the machine running it.
Claude Code's Sandboxed Bash tool illustrates both the protection and its scope. It uses Seatbelt or bubblewrap, with write access restricted to the current working directory by default. The restriction is enforced through the sandbox. Coverage, however, is limited to shell commands. File tools, MCP servers, and hooks run outside that boundary, so the shell's restrictions do not describe the permissions of the whole agent.
Against the five harms, filesystem access and secret exposure are only partially contained because coverage and configured permissions determine what remains accessible. Network egress needs explicit restrictions, and environment variables and /proc need additional controls. The kernel surface is still shared, and this tier's cross-tenant boundary is too weak for hostile workloads. Its legitimate use is internally written code that has passed CI/CD and has a reasonable trust basis. It is insufficient for LLM-generated or user-supplied code.
Tier 2 — Standard containers: shared kernel, demonstrated escapes
Standard containers such as Docker/runc use Linux namespaces and cgroups to separate processes, but every container on a host runs against the same kernel. A kernel exploit can bypass the namespace boundary and expose the host and its other containers. The potential blast radius spans the machine.
SandboxEscapeBench tested whether models could escape Docker containers or Kubernetes pods and reported successful escapes in a notable fraction of runs. Its Docker/OCI coverage leaves gVisor and Firecracker untested. This is evidence of an actual escape problem. It does not establish that every container configuration fails in the same way.
Filesystem namespaces and volume restrictions put some limits on file access, and environment isolation gives secrets some protection. An escape through the shared kernel can still bypass both. Outbound traffic requires explicit egress filtering, and namespace isolation is inadequate for compliance-sensitive hostile multi-tenancy. Standard containers are still a sound choice for trusted, internally written code, but they are too weak for untrusted agent output or user-supplied code. Their familiarity does not change that trust requirement.
Tier 3 — User-space kernels (gVisor): smaller kernel surface, not hardware enforcement
gVisor inserts Sentry, a user-space kernel written in Go, between application syscalls and the host. Agent code reaches Sentry rather than directly invoking the host kernel's syscall interface. gVisor's official blog describes implementing roughly 237 Linux syscalls to support containers. This substantially narrows the exposed host interface. Docker works with --runtime=runsc, so the boundary can change while the container workflow stays the same.
The boundary is software-enforced. Syscall interception contains most unauthorized filesystem paths and intercepts access toward /proc, improving protection for files and secrets. Cross-tenant separation is stronger than in standard containers, but the network still needs protection from a policy layered above the runtime. The kernel attack surface is reduced rather than separated by a hardware VM boundary. Software that needs unimplemented syscalls can also break or behave unexpectedly.
SandboxEscapeBench's Docker/OCI escape results cannot be presented as a gVisor escape rate, because the benchmark did not exercise it. That limitation neither proves gVisor safe nor erases its architectural improvement. Google Agent Substrate offers gVisor or Cloud Hypervisor microVMs on GKE Standard, grounding both approaches in an agent execution platform. It is still described as pre-1.0, with access for non-production use and an allowlist for production use under a limited GA program.
Tier 4 — MicroVMs (Firecracker, Kata, Cloud Hypervisor): how to give each AI agent its own isolated kernel
MicroVMs give each workload a separate guest kernel using KVM hardware virtualization. A guest kernel exploit therefore does not, by itself, cross into the host kernel or another guest. This is the decisive architectural break from containers. Firecracker, Kata, and Cloud Hypervisor provide options in this tier for workloads whose trust assumptions cannot support a shared kernel.
Firecracker keeps its attack surface small by leaving out virtual devices it does not need. Its minimalist configuration has no USB, no GPU pass-through by default, and no PCI bus, while virtio device hot-plug is a Developer Preview. It boots in roughly 125 milliseconds with roughly 5 MB of memory overhead per instance. These choices let more agents run in less space, with fewer devices open to attack than in a general-purpose VM. Minimalism serves both isolation and operating cost.
Of the five harms, filesystem access and secrets are held strongly within the guest boundary, which keeps environment variables and /proc inside the guest. Host filesystem access requires an explicit mount. Separate kernels provide the basis for strong cross-tenant containment. Network namespace isolation supplies a network boundary, but permitted outbound traffic can still exfiltrate data, so egress policy remains necessary.
Cloudflare Sandbox SDK runs untrusted and agent-generated code in isolated Linux microVMs, each with its own kernel and network, integrated with Cloudflare Workers. NVIDIA OpenShell combines Landlock and seccomp under an outside supervisor and offers a microVM option. The remaining blast includes the guest itself. An agent can exhaust its own disk, memory, or CPU, and prompt injection can still misuse whatever data and network permissions it receives.
Tier 5 — WebAssembly: formally verifiable isolation for stateless tool execution
WebAssembly changes how code runs instead of giving it another Linux environment. Each module has its own linear memory and starts with zero privileges in a capability-based model. The host explicitly grants access. Filesystem operations, network egress, and environment access are unavailable unless those capabilities are supplied, making the default boundary unusually narrow.
Against the five harms, that model strongly contains files, network access, and secrets, while formally specified linear memory isolation separates workloads. The module operates against a Wasm runtime rather than directly exposing a host kernel syscall interface. This is a different form of containment from a separate guest kernel. The capabilities a module is given still set what it can reach, and it can misuse an authorized tool even with formal memory safety.
Sub-10ms cold starts make Wasm well suited to short-lived, stateless execution. Parsing, transformation, and sandboxed function calls fit that profile. The current ecosystem is less suited to Python-heavy agents that rely on pip packages, persistent files, or browser sessions. Wasm is thus a strong choice for software that fits its capability model, but microVMs are still needed to run arbitrary agent software.
An experimental sixth tier: Library OS (Microsoft LiteBox)
Microsoft LiteBox explores a smaller interface between an application and its host. The application links directly against a minimal OS library that exposes only the controlled primitives it needs, instead of filtering a broad syscall surface or emulating a full kernel. The proposed advantage is a narrower attack surface. LiteBox remains pre-production, with no established production footprint in the supplied evidence, so it is an experimental approach rather than a demonstrated alternative to the deployed tiers.
Where each tier's blast actually stops: a cross-tier scorecard

Reading across the tiers separates permission restrictions from kernel containment. Process sandboxes begin limiting filesystem and secret access, containers add namespace separation, and gVisor intercepts the syscall paths through which workloads reach host services. MicroVMs place those resources behind a guest kernel of their own. Wasm instead withholds access through capabilities for workloads that fit its execution model. These approaches do not form a universal compatibility ladder.
Every tier from process sandbox through microVM needs an explicit egress policy, while Wasm denies egress until a capability grants it. Once outbound access is authorized, isolation alone cannot distinguish legitimate transmission from exfiltration. The same distinction applies to secrets. Keeping host credentials outside a guest is different from protecting credentials deliberately placed inside it.
For arbitrary Linux workloads, the critical kernel boundary falls between gVisor's software interception and microVMs' hardware-backed guest separation. Compliance-sensitive multi-tenancy calls for the latter. Prompt injection can still work on either side of that boundary. Input validation, tool-call allowlists, and output auditing must therefore complement the runtime boundary, because an isolated agent can still abuse its legitimate permissions.
Choosing the tier your threat model actually demands
The first decision is how much trust the code deserves. Internally written code that passed CI/CD may justify an OS process sandbox or standard container, especially for single-tenant internal tooling. LLM-generated code requires gVisor or microVM isolation. User-supplied binaries or arbitrary agent output should be treated as hostile, so they need at least a microVM. Multi-tenant SaaS and code playgrounds strengthen that requirement because one user's compromise must not expose another's workload.
Short-lived, stateless tools favor Wasm where its capability model fits, while persistent per-user agent sessions need snapshot-restore support to survive sleep and redeployment. MicroVMs have hardware isolation and support that persistent-state model. GPU requirements need separate attention because Firecracker excludes GPU pass-through by default, and user-space kernel approaches do not satisfy the direct-access requirement described here.
For persistent sessions, the recommended snapshot-restore scheduler model addresses the objection that microVMs require an expensive idle fleet. It boots once, takes a snapshot, and restores on subsequent creates. Idle state then incurs only storage cost. Because most agents are idle most of the time, that distinction can make strong isolation economically practical without maintaining a warm pool.
The final control is enforceable policy inside the chosen boundary. Allowlists, denylists, tool-call interception, and network egress rules must operate in code. These controls set which actions are allowed, while runtime isolation limits the harm when an agent or the environment it runs in is compromised. Production containment requires both layers.


