Engineering notes / Isolation

Your AI agent is executing
arbitrary code.
Standard containers aren’t enough.

The shared-kernel gap, the VM tax, and why isolation should be a per-workload choice instead of one default.

In my last post, I argued that Docker is too heavy and too operationally complex to be the default runtime for modern AI agents.

This post is about the harder half of that argument: if an agent runs on the host, it is a security incident waiting to happen. If it runs in a standard container, it shares the host kernel. One kernel bug or overlayfs escape and the agent has the host.

Traditional VMs fix the kernel boundary, but they bring a different tax: image pipelines, AMI builds, and boot times measured in seconds. An agent task that times out before the sandbox is ready is not a workload. It is a queue.

Agents need kernel isolation at container speed. That is the gap Pullrun was built to fill.

The shared-kernel problem

Containers are a process isolation mechanism. Namespaces, cgroups, seccomp, capabilities, and LSMs constrain what a process can see and do. They do not give it a separate kernel.

That is an acceptable trade for trusted application code. It is a bad trade for untrusted code generated by a model. The threat model is different: the code is not just buggy, it may be adversarial, and the model that produced it can be manipulated.

You can harden a container. You can drop capabilities, use a read-only root, apply seccomp, and avoid mounting the Docker socket. Those are good defaults. They are still a shared-kernel boundary.

The VM tax

VMs give you the boundary. The old operational cost was the image pipeline: build a VM image, maintain a Packer template, publish an AMI, wait for the VM to boot, then get to the actual task.

For a long-running service, that cost amortizes. For an agent task that lives for seconds, it dominates.

Pullrun’s bet is that the VM image pipeline is unnecessary if the runtime can use the OCI image directly. The same image that runs in a container becomes the rootfs for a Firecracker or Apple Silicon VM. There is no separate VM build step.

Isolation tiers, not one default

The useful framing is not “VMs are secure, containers are insecure.” It is a tier choice:

  • Containers: trusted workloads where density and startup matter more than a separate kernel.
  • Firecracker / Apple VMs: untrusted code that needs a kernel boundary.
  • Sandbox groups: many concurrent sandboxes inside one VM when the isolation boundary is the group, not every task.

The image stays the same. The isolation level is a property of the workload, not a separate packaging system.

What Pullrun actually does

Pullrun boots a standard OCI image as a Firecracker microVM on Linux or an Apple Silicon VM on macOS. The measured cold boot is 200–500 ms; a warm pool is around 200 ms. The container backend is still there for trusted workloads.

There is no background daemon. The CLI and runtime are roughly 20 MB stripped. Agents can drive the runtime through a native MCP server, or through the CLI, gRPC API, CRI, and Python/TypeScript SDKs.

That last part matters for agents: the runtime is not just a process launcher. It is an API an agent can call to boot, exec, inspect, snapshot, and tear down a sandbox.

What this does not solve

I do not claim “no escape.” Firecracker is a strong boundary, but it is software, and the host kernel, the snapshot loader, and the device model remain attack surface. No formal guarantee comes with a README.

Other limits are equally specific:

  • Containers are a trusted tier, not an untrusted-code sandbox.
  • Egress policy is opt-in with --egress-deny; without it, networking is allow-all.
  • Rootless egress enforcement is still blocked by a namespace-privilege problem.
  • Explicit secret mounts can still put secrets inside the workload, and snapshots contain guest memory.
  • The third-party audit is scoped, not completed.

Those are not footnotes. They are the boundary of the claim.

The question

If you are running model-generated code, what is your actual isolation boundary today — and what would you give up to make it a separate kernel?

Related: why a memory snapshot is a scheduling primitive — and what 150 ms restore changes about retries.

AI agentsFirecrackerIsolationSecurity
All writing ↗

Run the runtime, not another stack.

Install Pullrun ↗
Mohammed Boukaba

AI infrastructure and systems engineer. Creator of Pullrun and Rune. Rust, Go, Firecracker, Kubernetes.

GitHub ↗