Kernel Syscall Surface Exposure as the Core Argument Against Container Isolation for AI Agents
Shared host kernels are the real risk; per-agent microVMs fix it.

With Firecracker micro-VM isolation, each AI agent has its own Linux kernel behind a boundary enforced by hardware. Plain containers cannot keep agents apart in that way because their processes make system calls to the same host kernel. For untrusted agent code, especially across tenants, the decisive question is not how carefully the container is configured but which kernel receives its calls.
Why containers cannot isolate AI agents at the kernel level
A plain container runs its processes against the host kernel. Every other container on that host uses the same instance. There is no intervening guest kernel. When an agent makes a permitted system call, or syscall, the host kernel handles it directly, so a flaw in a reachable kernel interface can become an escape path.
Hardening changes which paths to the host kernel remain open. Seccomp filters restrict calls, dropped capabilities limit privileges, and rootless execution reduces authority. These are useful controls, but none creates a hardware boundary between the process and the shared kernel.
What the shared syscall surface actually exposes
Linux exposes hundreds of syscalls, and standard container runtimes do not filter most of them by default. Even a carefully tuned allowlist can leave dozens of calls with a history of CVEs available. Those calls are the working interface to the kernel. For a program to keep working, it must still be able to reach some kernel code from inside its container.
CVE-2022-0185 is a named example of a kernel vulnerability that enabled container escape. CVE-2024-21626, involving runc, illustrates a distinct escape path through the container runtime, a different category of failure from a kernel vulnerability. Both show why escape is more than a theoretical concern.
The shared kernel also determines the blast radius. A successful kernel exploit that gives an attacker control of the host puts every other container on that machine at risk. In a multi-tenant agent platform, the security boundary between customers then fails with the host boundary. One compromised agent can expose workloads it was never authorized to touch.
Why AI-generated and adversarial code makes this exposure acutely dangerous
Most traditional applications run code that their developers wrote and reviewed. Agents generate code from prompts, context, and model weights, then execute it without that review. The code changes from task to task. Treating it as trusted software assumes a vetting step that never happened, while the agent's execution tools give it a route to the syscall surface.
Prompt injection can turn that route into an attack chain even if the attacker has no direct shell access. The agent is already allowed to run code. If malicious input persuades it to run an exploit, role-based access control may see an authorized actor doing an authorized action. Microsoft's Semantic Kernel disclosure described a vulnerable path from prompt injection through sandbox escape to host-level remote code execution.
SANDBOXESCAPEBENCH, developed by researchers from the University of Oxford and the UK AI Security Institute, tests agents from an interactive root shell in containerized sandboxes. Frontier models reliably exploited difficulty-1 and difficulty-2 scenarios, but only the largest models had some success on difficulty-3 tasks that needed knowledge of a specific CVE or multi-step exploitation. No model succeeded at difficulty 4 or 5. These results show that agents can escape some vulnerable environments, but they do not show that every container is easy to breach.
Policy defenses need equally careful interpretation. The 69–98% failure rates discussed in a 2026 systematic review of agent isolation came from ShellSieve's denylist study. That study tested real commands that bypass denylists. It does not establish the same failure rate for seccomp profiles or capability drops, which were not evaluated under those conditions. The stronger argument against plain containers remains their shared kernel.
How gVisor narrows the syscall surface and where its limit sits
gVisor inserts a user-space kernel called the Sentry between the workload and the host. Written in memory-safe Go, the Sentry implements enough of the Linux syscall interface to handle most workload calls itself. A separate Gofer process brokers filesystem access, while seccomp restricts the host calls available to the Sentry.
gVisor's architecture documentation says its host-facing surface has at most 68 syscalls, or 53 without networking. To bypass that mediation, an attacker must first defeat the Sentry rather than simply invoke an available host syscall from the workload. Because the implementation is smaller and memory-safe, the attacker has less exposed code to work with.
The remaining boundary is still software on the host. A vulnerability in the Sentry's syscall implementation can create a path beyond the sandbox, so gVisor narrows host-kernel exposure without adding a separate guest kernel behind hardware virtualization. Interception also adds work to each syscall. That cost depends on call frequency, making the workload's syscall pattern an important criterion when choosing this middle tier.
How do you give each AI agent its own isolated kernel?
Firecracker boots a separate Linux kernel inside a KVM-backed microVM. The agent's syscalls reach that guest kernel. A guest-kernel compromise is not itself a host compromise. Reaching the host requires defeating the virtualization boundary as well, adding an escape barrier beyond entry-point filtering.
The Virtual Machine Monitor, or VMM, remains part of that boundary and can contain bugs. Firecracker limits its exposure by emulating only a minimal set of devices, with roughly 50,000 lines of Rust compared with a QEMU codebase orders of magnitude larger. Smaller does not mean invulnerable. The guest faces an interface kept narrow by design, with no direct access to the host's broad syscall interface.
Kata Containers offers a Kubernetes-native route to this design. Its documentation describes support for multiple VMMs, including Firecracker, through standard container interfaces. The deployment can look like a container to Kubernetes while the workload runs behind hardware isolation. Because the guest has a real Linux kernel, it also avoids the syscall-reimplementation compatibility trade-off, which is useful for arbitrary toolchains and full operating-system stacks.
That separation supplies the security boundary, but agent sessions also need continuity. If a machine lost its working state between tasks, the application would need a different design.
Snapshot and resume as the mechanism that makes per-agent isolation practical
A resumable agent machine needs more than a copy of its files. Its checkpoint must preserve guest memory, including kernel and process state, together with disk, device, and vCPU state. The architecture described here stores filesystem and guest RAM data in content-addressed chunks and uses Firecracker snapshot data for device and vCPU state. Execution resumes where it paused. This preserves the session rather than rebuilding it from a conversation transcript.
DigitalOcean describes Firecracker snapshot restoration fast enough to resume sleeping agents in milliseconds. That lets a separate machine serve sessions that wait a long time between tasks. There is a concrete constraint, however. Firecracker closes every guest vsock connection on resume, so a control channel that uses that connection cannot stay open through a checkpoint. The agent infrastructure must reconnect after waking the guest.
Suspension also changes the economics of isolation. A machine for one session does not have to stay active and billed for as long as the session lasts. With a per-second model and no idle charge, it can sleep between tasks and keep its working state.
What the isolation requirement means for how agents should be deployed
For untrusted production workloads, the resulting deployment pattern is one isolated kernel per user, session, or job. Separate guest kernels for different tenants prevent a guest-kernel escape from becoming the direct cross-tenant path it is on a shared container host. It places another enforced boundary between an agent and neighboring workloads.
Sensitive workflows make that distinction especially important. A healthcare agent's escape can interrupt a task, expose protected health information and create regulatory consequences. Hardware separation addresses the cross-tenant kernel risk. It is a security design choice for HIPAA-covered workflows that still require controls on what health information the agent receives.
Computer-use agents also need a complete operating environment. EHR platforms, remotely delivered applications, loan origination systems, and property management software can require an OS kernel, graphics stack, and input surface. Human takeover needs a persistent, addressable desktop too. A microVM with a GUI surface fits that pattern, while a stateless container does not supply the same session model.
The same isolation unit extends to training and evaluation fleets running thousands of parallel agent rollouts. An infrastructure layer can run these computers without running the models themselves. Per-second metering, no idle charge, and support for both disposable and resumable machines align the service with the task lifecycle.
Where the microVM-always argument has limits and how to reason about them
GPU access can make containers the practical choice when both the user and agent need it and VM passthrough adds too much friction. That is a genuine engineering constraint. Choosing containers in that situation means accepting a weaker boundary deliberately, rather than treating hardware isolation as free or operationally interchangeable with containers.
Hardware virtualization requires deployment privileges that some cloud environments do not provide. A microVM is not an available option there. The security merits of a design cannot remove a platform restriction, so the remaining choices must be judged against the actual workload and its exposure.
Risk also varies by task. A low-risk, read-only operation or already-reviewed program may not justify the cost and delay of full microVM isolation at scale. Classifying tasks during planning can support a hybrid deployment. These exceptions narrow the recommendation to workloads that need a stronger boundary. They do not turn shared-kernel containers into an equivalent one.
Hardware isolation also leaves open what the agent is allowed to do inside the guest. A hijacked tool can still send out secrets it was legitimately handed, without escaping anything. The wall has not failed in that case. Least-authority design addresses this separate problem by granting no access by default and adding only what the task needs, including filesystem paths, credentials, and network endpoints.
Choosing isolation tier by workload: a practical decision framework

The first decision is whether the executed code is reviewed, LLM-generated, or user-supplied. The next is whether other tenants share the environment. Persistent state and desktop interaction then determine what the machine must preserve. These criteria separate boundary strength from session features, so a need for persistence does not obscure the more basic question of whether the code is trusted.
Tier 1 is standard containers for trusted, reviewed code in a single-tenant environment. Code provenance must be known, and the host kernel must not be shared with other customers' workloads. This is the narrow acceptable case. Container hardening still limits the calls and privileges available in this case, but it does not add hardware isolation.
Tier 2 is gVisor for single-tenant, compute-heavy workloads with predictable syscall patterns, offering an interception layer that meaningfully reduces host-kernel exposure as an alternative to full VM isolation. The syscall profile needs to fit that layer, because frequent calls can make interception costly. This tier is a considered middle ground.
Tier 3 is a hardware-isolated microVM for code that is LLM-generated or user-supplied, for multi-tenant execution, or for regulated data. Coding agents, computer-use agents, and evaluation pipelines belong here when they meet those conditions. Persistent sessions add snapshot and restore. Desktop interaction also needs a complete operating environment and an addressable GUI so agents can work and people can take over.
Across all three tiers, the lesson is to restrict what the sandbox receives to what its task requires. Isolation cannot recover a secret that the agent was authorized to disclose. A platform that runs the computer rather than the model can make the tier a configuration choice, with developers supplying their own model and keys. Support for throwaway sandboxes, resumable machines, and per-second billing then lets the execution environment follow the workload without requiring an architectural rewrite.


