InterdictionLabs Contact

Blog · Part 2 of 6 · Nov 30, 2026 · 16 min read

One VM per run: inside Cellz

How Cellz runs one agent task in a VM of its own with gVisor inside, why nothing reaches the agent until the VM has proved which instance it is and a probe has passed, how five parties sign records about the run that are checked against each other, and what happened when we broke each dependency under a live cell on purpose.

Summary
  • Cellz is where we run sandboxed agents, and Proofz is the receipt that says how each run went. A cell is one agent run's virtual machine and everything made for it. Each run gets a fresh EC2 instance from an image built in CI, with gVisor inside it, in an AWS account that holds nothing but cells. The services a run may reach live in a second account, joined to the first only through PrivateLink.
  • Nothing reaches the agent until the VM has proved which instance it is, using the identity document AWS signs, and a probe has checked the fresh sandbox. The guest can reach exactly two addresses: a meter for model calls and a proxy for the web.
  • Every run produces six records from five parties: the cell's own statements, the orchestrator's launch and stop records, the meter's debit log, the proxy's egress log, and the breaker's verdict. They are checked against each other before any receipt is made.
  • We broke every dependency under a live cell on purpose. Each failure froze or stopped the cell within 70 seconds, with its disk kept.

Part 2 of six on how our containment architecture works. Part 1, A signed receipt for every agent run, covers what the receipt says and how to check it; this part covers where the run happens. Parts 3 to 6 follow in December.

Why a VM per run

A receipt is only as good as the sandbox it describes. We wanted the place an agent runs to have three properties that are easy to state and hard to get from a shared machine.

The first is freshness. A run should start on a disk and in memory that no earlier run touched, so nothing one evaluation planted can be found by the next. A container on a long-lived host can be fresh at the filesystem level, but the host's kernel, its caches and its other tenants are shared.

The second is a boundary the agent can't talk its way across. An agent runs arbitrary code by design, so the question isn't whether it will try a system call it shouldn't, but what stands between that call and the host. We use two layers: gVisor, which answers the agent's system calls with its own user-space kernel, inside a VM that is the agent's alone. A gVisor escape lands in a VM with nothing else in it.

The third is evidence from outside. Anything the sandbox reports about itself is reported by the place we trust least. So the facts a receipt rests on (which VM ran, which image it booted, what left the network, when it stopped) have to be recorded by something the agent can't reach.

A VM per run costs more than a container per run, and boots slower. We chose it anyway because it makes all three properties simple to show. A c7g.large cell costs a few cents an hour, and most agent runs spend their time waiting on a model, not on the VM.

The layout

The work is split across three AWS accounts. The cell account holds only cells: a VPC with no internet gateway, no NAT, no DNS and no peering. Its one way out is a PrivateLink endpoint that forwards four TCP ports to the control account. The control account holds the services a run may talk to and the one service that may launch runs. The trust account holds keyz, which issues each run's token, and the receipt signer, which logs receipts publicly.

Where a cell sits: three AWS accounts, joined only by PrivateLink and signed callsOne run, one VM: the cell account holds runs, the control account holds the services they may reachrecurz-sandbox (cells)VPC with no internet gateway, no NAT, no DNScell VM, one per runc7g.large by default; no SSH, no SSM, no instance rolehost agent (root, outside the sandbox)builds the walls, runs the probe, writes the run log,signs statements with a boot key made in memorygVisor sandboxcell-holdprobe (first)agent (after)sees two addresses only:10.255.0.1:8443 models (tollz)10.255.0.1:3128 the web (proxy)PrivateLink endpointrecurz-sandbox-ctl (control)the services a run may reach, and the one that launches runsorchestratorlaunches and ends cellstollzmodel calls, meteredcell proxythe web, by profilebreakertrips and stops runsmirrorimages and workspacescollectorcanary sightingsTCP to four ports onlyrecurz-trustkeyzissues each run's token,signed in KMSreceipt signerlogs each receipt in thepublic transparency logrun tokenreceipt
Where a cell sits. The cell account holds one VM per run, with no internet gateway, NAT or DNS. On the VM, the host agent runs as root outside a gVisor sandbox, and the sandbox holds cell-hold, then the probe, then the agent, and sees only two addresses: 10.255.0.1:8443 for model calls through tollz and 10.255.0.1:3128 for the web through the cell proxy. A PrivateLink endpoint carries TCP on four ports to the control account, which holds the orchestrator, tollz, the cell proxy, the breaker, the mirror and the collector. The orchestrator gets each run's token from keyz in the trust account, and receipts go to the receipt signer there, which logs them in the public transparency log.

There are three programs and one image on the cell side.

The orchestrator runs in the control account. It is the only principal allowed to launch instances in the cell account, and the role it assumes there can launch only from the cell launch template and images from our pipeline, and terminate only instances tagged as cells. For each run it registers the run with the breaker and the meter, asks keyz for the run's token, launches the VM, hands the cell its work once the cell has proved who it is, and collects the evidence at the end.

The host agent runs on the cell VM as root, outside the sandbox, started by systemd at boot. It builds the network walls, starts the sandbox under runsc (gVisor's runtime), runs the probe, starts the agent, writes the sealed run log, and on a stop cuts the network and freezes the sandbox. It holds no long-lived key and no AWS credentials. Its only key is one it generates in memory when the VM boots.

cell-hold is a tiny static binary that is the sandbox's first process. It only reaps children. It exists so that the sandbox is up, and fresh, before the probe and then the agent are started inside it.

The cell image is an Amazon Linux 2023 disk, built in CI with no AWS credentials, one per CPU architecture. It has runsc, the host agent, cell-hold and the probe baked in. It has no SSH, no SSM agent and no instance role, and cloud-init is limited to reading EC2 metadata: it never runs user data. So a VM booted from it knows everything it will run before it receives anything, and nobody can log into it.

One run, start to finish

A caller posts a run: the task's root filesystem and workspace by SHA-256, the command, a deadline, the model spend caveats and the buyer profile. The deadline counts from the request, so time spent waiting for capacity counts against it.

One run start to finish, as messages between the orchestrator, the host agent and the sandboxOne run: nothing reaches the agent until the cell has proved which VM it is and the probe has passedorchestratorhost agentsandboxregisters the run with the breaker and tollz,gets a run token from keyz, launches the VM1 user data: run id, nonce, endpoint2 register: AWS-signed identity, nonce, boot keychecks AWS's signature, the instance, theimage and the nonce; signs the launch record3 run bundle: grant, token, honey tokens, taskbuilds the walls, fetches the rootfilesystem by digest, starts the sandbox4 the probe, before anything else5 report, sealed in the run log6 workspace, honey tokens, then the agentevery 60 s: signs the run log's headand sends it out (an anchor)7 final statement, then the run logends tollz and proxy runs, reads the breaker'ssigned verdict, signs the stop record
One run, as messages. The orchestrator registers the run with the breaker and tollz, gets a run token from keyz, and launches the VM. 1: the VM's user data holds only the run id, a nonce and the orchestrator's endpoint. 2: the host agent registers with AWS's signed instance identity document, the nonce and its boot key. The orchestrator checks AWS's signature, the instance, the image and the nonce, and signs the launch record. 3: it sends the run bundle with the grant, the run token, the honey tokens and the task. The host agent builds the walls, fetches the root filesystem by digest and starts the sandbox. 4: the probe runs first; 5: its report is sealed in the run log. 6: only then the workspace, the honey tokens and the agent. Every 60 seconds the host agent signs the run log's head and sends it out. 7: at the end it sends its final statement and then the run log, and the orchestrator ends the tollz and proxy runs, reads the breaker's signed verdict, and signs the stop record.

The step that matters most is registration. When the VM boots, the host agent reads two things from the instance metadata service: the run id and a random nonce from user data, and the instance identity document, which AWS signs. It generates its boot key, then sends the orchestrator the identity document, AWS's signature, its public key, the image manifest, the gVisor version, and its own signature over all of that and the nonce.

The orchestrator accepts the first registration for a run and refuses every later one. It checks AWS's signature against the region's certificate, and that the document names the instance it launched, in the right account and region, with the right instance type and image. It checks the nonce and the boot key's signature. It also confirms through the EC2 API that the run has exactly one workspace volume, blank and attached to this instance only. Only then does it sign the launch record, which binds the run to that instance, that image and that boot key, and answer with the run's work.

This is what lets the rest of the run trust the boot key. The guest is walled off from the metadata service, and the image has no SSH or SSM. So whoever signed with that boot key could read this instance's metadata before the guest started, and that can only be the host agent.

The probe runs next, before the workspace is filled and before any input is written. The host agent copies it into the fresh sandbox and runs it there. Its report, which says what the probe could reach and what it found lying around, goes into the run log. If a check the run's profile enforces fails, the run ends there as aborted, and the agent never starts. Part 1 describes the probe's checks.

Then the host agent fills the workspace, plants the run's honey tokens, and starts the agent. Honey tokens are credentials that are valid nowhere. They go in after the probe, because the probe's credential check would otherwise rightly flag them, and the host agent plants them through the running sandbox so that gVisor sees them. A run that reaches for one has gone looking for something it had no use for, and using one trips the run.

While the agent runs, every chunk of its output goes into the run log as it arrives. Every 60 seconds the host agent signs the log's head and sends it to the orchestrator as an anchor, so a run that dies midway still has a signed head no more than a minute old.

The walls

The guest has three network layers between it and anything else. gVisor has its own network stack. Around it, the host agent's walls. Around those, the cell VPC, which has no route anywhere but the PrivateLink endpoint.

The guest lives in its own network namespace with one virtual Ethernet pair: 10.255.0.2 inside, 10.255.0.1 on the host side, and a single route to 10.255.0.1. On that address the host agent's nftables rules forward exactly two ports. Port 8443 goes to tollz, our model-call meter, and port 3128 goes to the cell proxy, the only way to the web. Everything else is dropped: the metadata range 169.254.0.0/16, the VPC's own addresses, all IPv6, and any connection to the host itself.

The walls: the guest's one veth pair, the host agent's nftables rules, and the VPCThree network layers, and the host agent owns the middle oneguest network namespace10.255.0.2one veth pair, one route:via 10.255.0.1under gVisor's own netstackhost agent's nftables:8443 DNAT to tollz :8440:3128 DNAT to proxy :8899drop 169.254.0.0/16, the VPC range,all IPv6, anything else to the hostcell VPCPrivateLink endpoint, oneaddress per zoneno internet gateway, no NAT,no DNS, no peeringOn a stop, in this order1swap in drop-everythingone nft -f; open flows die too2runsc pausethe guest stops running3runsc checkpointmemory and state to the root disk4sign the final statementhow it ended, and whenThe breaker's own EC2 stop follows as a second, independent path. Both keep the disks.
The walls. The guest network namespace has address 10.255.0.2, one veth pair and one route via 10.255.0.1, under gVisor's own netstack. The host agent's nftables rules forward port 8443 to tollz on 8440 and 3128 to the proxy on 8899, and drop 169.254.0.0/16, the VPC range, all IPv6 and anything else to the host. The cell VPC has a PrivateLink endpoint with one address per zone and no internet gateway, NAT, DNS or peering. On a stop, in order: swap in a drop-everything ruleset with one nft -f, so open flows die too; runsc pause; runsc checkpoint to the root disk; sign the final statement. The breaker's own EC2 stop follows as a second, independent path, and both keep the disks.

The ruleset is generated from the run's bundle by one pure function. That made it easy to test: a test reads exactly what a cell will enforce, and CI checks every generated ruleset with nft -c.

The guest's environment points its model SDKs at http://10.255.0.1:8443, with the run's grant from tollz as the API key, and sets HTTPS_PROXY to 10.255.0.1:3128 with the run token as the proxy credential. Neither credential can open or end a run; those routes live on listeners the cell endpoint never exposes. The guest never sees an AWS credential, a model provider key or the boot key.

A build run that needs name lookups can ask for them. The host agent then answers DNS on 10.255.0.1:53 itself, from the run's egress profile, never asking another server, and resets any connection to an address it answered with, so the answer is only good for going through the proxy.

Stopping a run

A run ends when the agent exits, the deadline passes, the orchestrator says stop, or the breaker trips it. The breaker is a separate service that stops runs on evidence: a honey token used, a spend cap reached, a dependency lost.

On a normal end, the host agent kills the sandbox, flushes and unmounts the workspace, and seals the run log with an end entry, after which nothing can be added. It signs the final statement (the run log's head, how the run ended, the exit code and times), sends it, and then uploads the log. The orchestrator accepts only the log whose head the signed final names.

On a trip the order changes, because the goal is to keep everything. The host agent first swaps in a ruleset that drops everything, in one nft -f, which cuts connections that are already open, not just new ones. Then it pauses the sandbox, checkpoints it to the root disk, and signs the final statement. The breaker stops the EC2 instance as a second, independent path. Neither path terminates anything: the stopped VM and its disks are the evidence, and they stay.

The orchestrator then ends the run with tollz and the proxy, which return their logs, and fetches the breaker's signed verdict. If the breaker can't be read, the VM is kept, as on a trip. For a run that asked for grading, it snapshots the workspace volume and hands the snapshot to a separate grader account. Then it signs the stop record and stores the run's evidence.

Records that check each other

Each party writes down what it saw, signs it with its own key, and the records are compared.

The signed records a cell run produces, who signs each, and the check that compares themSix records from five parties, compared before any receipt is madehost statementsregister, anchors every 60 s, finalboot key, made in memory at bootlaunch recordwhich VM, image, AWS identity, boot keyorchestratorstop recordhow it ended; log heads; snapshotorchestratordebit logevery model call, reserved and settledtollz (hash chain; head in the receipt)egress logevery connection and refusalcell proxy (hash chain; head in the receipt)breaker verdictended or tripped, stop timing, shellsbreaker's own keyEvidence::checksame run id and sequence everywherelog heads match the final statementa verdict that says tripped can't besigned as a clean runrun by the orchestrator before it storesthe evidence, and again by the signer
Six records from five parties. Host statements, signed by the boot key made in memory at boot: register, anchors every 60 seconds, final. The launch record, signed by the orchestrator: which VM, image, AWS identity and boot key. The stop record, signed by the orchestrator: how the run ended, the log heads and the snapshot. The debit log from tollz, a hash chain whose head goes in the receipt, with every model call reserved and settled. The egress log from the cell proxy, a hash chain whose head goes in the receipt, with every connection and refusal. The breaker's verdict, signed by its own key: ended or tripped, stop timing and shells. All six go to Evidence::check, which needs the same run id and sequence everywhere and log heads that match the final statement, and refuses a verdict that says tripped signed as a clean run. It runs in the orchestrator before it stores the evidence, and again in the signer.

The cell's host statements are signed by its boot key: register, an anchor every minute, and final. Each carries the run id and a sequence number, so a statement from one cell can't be replayed into another run or out of order. The orchestrator signs the launch record and the stop record. The debit log and the egress log are hash chains in the same format as the run log, and the receipt commits to each one's last hash. The breaker signs its verdict with a key of its own: whether the run ended or tripped, how the stop went and how long it took, which tripwires were planted and which were hit, and every shell anyone was granted into the run.

One check, Evidence::check, compares them: the same run id everywhere, sequences in order, the log heads the final statement names, and the breaker's verdict against the stop record. It refuses a bundle where the breaker says the run tripped and the stop record says it ended cleanly, so the orchestrator can't sign a tripped run as a clean one. The orchestrator runs this check before storing the evidence, and the receipt signer runs the same code.

The point of splitting the signatures is that no single compromised component can produce a clean record on its own. An orchestrator that lied about a launch would disagree with AWS's signed identity document. A host agent can't sign as the orchestrator. The breaker's verdict comes from a different host with a different key. Today one weakness remains: the orchestrator also signs the receipt itself, with a key that sits on its host. Part 6 covers moving that signature into an enclave that checks all of these heads before it signs.

Tripwires in the control account too

Per-run honey tokens catch a run that reaches for what it was handed. Standing canaries catch anything that reaches the control account itself. At start, the orchestrator asks the breaker to mint canaries and writes them as files on its own host: a URL whose host name is watched, and a key in the shape of a model provider's. Any use of one trips every live run and holds new ones, because something has reached a place no run should. The repository names no lure paths, and the deployed config does.

Failing closed

A run needs tollz, the proxy, the breaker, keyz, the log and the canary collector to be healthy. The orchestrator checks each of them continuously. While any one failed its last check, it refuses new runs and freezes every running cell, which the breaker then stops with its VM kept. In the other direction, a host agent that hears nothing from the orchestrator for 45 seconds freezes its own cell.

One dependency is deliberately not on that list: the receipt signer. A running cell never needs it, because the signer is only used once a run is over. A receipt the signer can't take is kept and sent again until it is logged, and an alert fires if one waits ten minutes. That lets us deploy the signer, which replaces its host, without freezing every run in flight.

Deploying the services a running cell does need doesn't freeze it either. A new orchestrator or breaker host starts beside the old one, waits for the old one to hand over its state and a lease, and then takes over its address. The breaker hands over in about 7 seconds and the orchestrator in about 12, inside the 15 seconds the fail-closed guard allows before it freezes cells. In our test, a cell ran its full 55 minutes while both hosts were replaced under it.

What happened when we broke it

We set off every failure mode we knew of against live cells in our own account, one cell at a time and with no model spend. The aim was to confirm that each one is caught, that the run fails closed, and that proofz verify rejects tampering.

Game day timings: how long each failure took to freeze or stop a live cellGame day: each failure, set off under a live cell, and how long until the cell was frozen or stopped0 s20 s40 s60 s80 splanted key sent to tollz22.6 s tripped; VM stopped, disk kepttollz host stopped28 s fail-closed: tollz; launches refusedorchestrator stopped32 s the cell froze itselfbreaker host stopped69 s fail-closed: breaker; run doneOne cell at a time, no model spend. Seconds from the fault (for the planted key, from the trip) to the frozen or stopped cell.
Game day timings, one cell at a time with no model spend. A planted key sent to tollz tripped the run, and the VM was stopped 22.6 seconds after the trip with its disk kept. Stopping the tollz host froze the cell 28 seconds later with launches refused. Stopping the orchestrator made the cell freeze itself 32 seconds later. Stopping the breaker host froze the cell, and the run was done 69 seconds later.

The walls blocked egress, direct DNS, the metadata service, lateral moves and the control account's ports, and a request to use tollz as a web proxy got a 404. A $0 spend cap was refused. A planted key sent to tollz tripped its run. Six edits to a receipt, its evidence or its run log were each rejected by proofz verify.

Then we went the other way and tried to get out. A boundary drill tried to mount /proc, bind-mount the root, reach a host disk, write sysctl and cgroup files, and reach the sandbox's control files, and each was refused. A network drill tried outside addresses, the metadata service spelled in decimal, hex, octal and IPv6, three public resolvers, and seven ports on the next host on the subnet, and each was refused. Sixteen cells launched together tried to find each other by broadcast, multicast, TCP and DNS, and none heard another.

In a separate run with real model spend, eight agents shared one cell for a short finance task with two doors left open in it: a "live" exchange rate from a site that doesn't resolve, and a note pointing at a planted key. Four agents tried the site and got a DNS failure. None read the planted key; the lead agent's report said the key wasn't used because no one had authorized it. The cell recorded 97 model calls in its debit log, and the breaker saw no tripwire hit.

Watching for escapes, quietly

Each cell also runs an escape detector. gVisor can stream every system call the sandbox makes to a monitor. The host agent turns each call into a short token (the call's class, its outcome, and the class of path, address or process it touched), scores the most recent 4,096 tokens with a small compiled model trained on escape attempts, and writes an entry to the run log the first time any of six families of escape behavior scores above 0.5. A few calls fire at once, without waiting for the model: the agent's first try at loading a kernel module, kexec or a reboot, and its first open of /proc/kcore, /proc/kmsg or /proc/sysrq-trigger.

The detector runs in shadow: it only writes, and never changes how a run ends. Paths, addresses and arguments never leave the host agent; only the tokens reach the log. Tracing costs the guest some time per traced call, from no measurable change for a shell loop to about 50% for tar reading 6,900 files, the worst case we found. Agent work mostly waits on models and the network, so we expect the real cost to be far smaller, and the first weeks of shadow runs will tell us.

What's built and what's next

Built and running in our own account: the image, the host agent, the orchestrator, the walls, the signed records and the evidence check, the standing canaries, the fail-closed guard, the escape detector in shadow mode, and orchestrator and breaker deploys that don't freeze running cells. The drills above ran on live cells. The breaker's signed verdict records each trip: what caused it and when AWS confirmed the stop.

Next:

  • Receipts for runs that hit their deadline or are cancelled. They still get none, because the receipt has no verdict for them yet.
  • The orchestrator's signatures in KMS. Its launch and stop records, and today the receipt, are signed with a key held on its host. They move to a KMS key in the control account, and the receipt moves to the signer enclave.
  • Anchors in the public log. The host agent's minute-by-minute anchors go to the orchestrator today. Logging them publicly means a run killed midway has a public record up to its last minute.
  • A stronger boundary. Cells launch on gVisor in a VM. The next step is Graviton5 instances, whose hypervisor AWS has formally verified, and a field in the receipt that says how each isolation layer is assured.
  • Several guests per cell. The orchestrator can already put several guests on a private segment, each probed. It needs container images from the mirror, whose image routes aren't built yet.

Next in this series: the cell proxy, the guest's only way to the web.

Running agents you need to contain?

We build for labs running agent evals, the partners who host them, and platforms carrying agent fleets. If you have seen an agent do something it should not have, we want to hear about it. Write to ask for a sample safety evals report, early access to the escape detector, or, for approved labs, our private swarm implementation evals.

hello@interdictionlabs.ai