Evaluating Isolation Architectures for Autonomous Coding Agents Beyond the Sandbox Checkbox
Sandboxing is not one control: five layers must be tested together.

A bring-your-own API key cloud coding agent runner must be evaluated on more than whether it accepts an API key from Anthropic or another vendor. For teams assessing cloud execution of Claude Code or Codex without managing their own infrastructure, the decisive question is what the runner prevents an agent from doing. A sandbox checkbox cannot answer that question. Compute isolation, network restrictions, credential scoping, authorization, and runtime verification must be assessed together.
Why application-level containment fails once an agent can invoke subprocesses
Once an agent invokes a subprocess, an application-level approval no longer describes everything that can happen. The subprocess can execute behavior that the calling application does not see. Command approval is therefore not the execution boundary. Documented red-team behaviors include harvesting credentials from environment variables, attempting to install persistent network listeners, and deploying packages with obfuscated payloads. These behaviors require a threat model that covers deliberate misuse as well as accidental mistakes.
The ZombAIs prompt-injection demonstration makes that distinction concrete. A security researcher directed Claude to a malicious page during web navigation. After reading a plaintext injection payload, the agent downloaded a binary, ran chmod +x, executed it, and connected to a command-and-control server on the first try. Calling that environment “sandboxed” would say little without specifying which of those actions the boundary could prevent.
What the isolation stack actually consists of, and why each layer is distinct

Meaningful isolation consists of a VM or microVM boundary, network egress control, credential scoping and secrets access, pre-action authorization, and runtime verification. Each protects a different surface and can fail independently. A kernel boundary does not grant or revoke an API permission. An authorization decision does not establish that generated code behaves correctly, while a passing test does not establish that its credentials were appropriately scoped.
The Balkanization of Execution-Security Research for AI Coding Agents systematizes papers published between 2023 and 2026 and identifies a comparison gap. Isolation architectures and capability models are evaluated against attacker capabilities but almost never against one another on a shared benchmark. The Balkanization SoK also describes research fragmented across execution-security mechanisms. That fragmentation has a practical consequence for deployment decisions. A team can harden the layer its research covers while leaving an adjacent layer unexamined.
How VM boundaries actually provide kernel-level separation, and where they stop
A microVM provides the strongest compute-layer isolation described here by separating the guest kernel from the host. E2B’s sandbox architecture uses Firecracker, the microVM technology AWS uses to isolate Lambda functions. Each sandbox receives its own kernel and network namespace. A guest kernel vulnerability alone does not break the VM boundary that protects the host.
The workspace inside that boundary still needs to be useful. Coding agents need repositories, dependencies, services, and configured access in a full Linux environment. Stripping these away can prevent realistic work while leaving unresolved what the VM can access. Network connections and mounted secrets remain available capabilities unless other controls restrict them.
The Balkanization SoK identifies a patched runc container-escape vulnerability affecting a runtime used by agent sandboxes. This is a container-runtime weakness. It does establish the need to examine patching. Non-root containers, seccomp profiles, read-only root filesystems, and CPU and memory cgroups add defense in depth alongside VM separation. Compute isolation is needed, but it does not control every connection the guest can make.
Network egress control and why default-allow networking undermines every layer above it
A contained agent does not need to escape its VM to send sensitive data elsewhere. Default-allow egress leaves a path for exfiltration even when kernel separation holds. It can also leave production infrastructure within reach. The credential harvesting and persistent-listener attempts described in red-team evaluations target network access and can work without a compute-boundary escape. Strong host isolation cannot compensate for unrestricted outbound communication.
CeLLMate illustrates this principle at the browser layer. Its “Agent Sitemap” maps HTTP requests to semantic actions, and a Chrome extension enforces default-deny outbound policies.
The defensible posture is deny-by-default egress with explicit task-scoped allow-lists. Allow-by-default networking with blocked patterns reverses that burden. It requires the defender to anticipate paths an agent might generate. Because an agent can produce novel exfiltration paths, pattern matching is not equivalent to restricting reachable destinations and actions to the task’s needs.
Credential scoping as a distinct problem from secrets storage
SOC 2’s technology-neutral criteria can cover AI agents without explicitly requiring them to be treated as a distinct identity class. An agent can therefore introduce risk without failing a control. When agents operate anonymously or borrow human engineers’ credentials, audit trails can conflate agent actions with human actions.
A vault addresses where secrets are stored, not what an authorized reader can do with them. Once an agent can read a credential, the credential’s permissions define part of its reach. Storage protection cannot narrow those permissions after access. The practical requirement is short-lived, task-scoped credentials tied to agent task identity rather than ambient credentials inherited from the engineer who launched it.
Bring Your Own Cloud, or BYOC, addresses the location and audit perimeter of that activity. In this architecture, executions, tool calls, and data access happen inside the enterprise’s VPC, while the vendor manages only the control plane. This keeps credential use within the enterprise’s audit perimeter. It is distinct from bringing an API key to a cloud runner. Owning a key alone does not establish where execution happens, what the agent identity is, or which services the agent can call.
Why text-of-command approval misses the class of harm that matters most

make clean && make can delete only regenerable build artifacts in one workspace and delete source files and repository history in another. The Makefile determines which outcome occurs. “Shall We Approve?” Consequence-Aware Approval for Autonomous Coding Agents uses this example to show how command text can hide what a command does. An approver reading only the command sees identical input. The dangerous behavior resides in the tool it invokes.
Static rule checkers, guardrail models, and deployed permission classifiers share this limitation because none observes execution before deciding. Anthropic reports that users approve the vast majority of Claude Code permission prompts. That volume creates a risk of approval fatigue. Claude Code’s Auto Mode uses a model-based classifier, with narrow allow rules short-circuiting it and broad allow rules suspended on entry, but it retains the text-assessment gap.
Caper instead pre-executes commands in a snapshotted sandbox under system-call tracing. Its bounded effects report shows which processes caused persistent workspace changes, tried to make connections, and read credentials. An LLM approver assesses those consequences against the user’s task, and blocked commands roll back with an actionable reason. The evidence changes from proposed syntax to observed effects.
Caper reports the lowest harmful-outcome rate among evaluated systems on SABER, less than half that of the next-best system. It also outperforms the other systems by a wide margin on YoloFS-Ext while maintaining a very low false-positive rate on safe task twins. YoloFS-Ext hides harmful behavior inside invoked tools, which tests the failure mode that command-text inspection cannot directly observe.
TOCTOU and state-validation races as a structural gap across isolation layers
Even an effects-aware decision can fail if execution uses a different workspace state. Time-of-check-to-time-of-use, or TOCTOU, names the gap between validating a state and acting on it. The Makefile example extends directly to this problem. Approval based on one Makefile does not authorize the effects of a different Makefile encountered later.
The Balkanization SoK identifies state validation as a cross-cutting problem despite separate research on TOCTOU and Model Context Protocol threats. An MCP tool call can be validated against one workspace state and execute against another. Individually sound controls can therefore compose poorly. Compute isolation, network policy, and authorization must be assessed with the state changes between decisions in view.
Caper addresses this gap within authorization through snapshotted pre-execution and commit or rollback. The decision applies to the execution represented by the snapshot. That is a narrower claim than eliminating every race. The SoK also finds that no access-control or capability paper in its corpus addresses measured benign but out-of-scope actions under realistic prompting. For execution to be acceptable, it must meet separate checks for state consistency and task scope.
Runtime verification as the final enforcement point before a pull request ships
Authorization decides whether an action may go ahead, while runtime verification checks whether the work it produces behaves as intended. Code as Agent Harness treats test-based execution and runtime error feedback as core mechanisms for making output verifiable and adaptive. Generated code is not yet verified code. Building, running tests, and exercising output can expose errors and unintended effects that static analysis and pre-action approval do not catch.
Browser verification checks a different surface when work is meant for the web. An agent can confirm UI behavior, check for unintended credential prompts, and examine whether network calls match the expected scope. Unit tests do not cover all of those behaviors. The harness source-code study identifies human oversight for safety-critical actions as an open challenge, while automated verification narrows the residual work requiring review.
That benefit depends on the verification environment’s fidelity. Tests in a stripped sandbox that lacks real service dependencies can give a false sense of how code will behave in a production-adjacent setting. The credential-scoping logic applies here as well. Verification needs the same services, secrets shape rather than secret values, and network topology as the target deployment. A mismatch between those environments is itself an isolation architecture failure.
How divergence across production agent harnesses translates into real evaluation differences
Harness Engineering: Anatomy, Architecture, and Evolution of Coding Agents compares source code pinned to July 2026 and describes materially different enforcement boundaries. Claude Code uses an opt-in OS sandbox with network restrictions, git worktrees for branch isolation, and behavioral policy that has migrated from prompt prose into configuration. OpenCode has permission rules, tree-sitter command parsing, and shadow-git checkpoints, but no sandbox.
The harness study also finds that SKILL.md skills lead MCP in adoption across its corpus. Registries, trust tiers, and agent-authored skills extend what a harness can invoke. Those extensions also widen the attack surface. Authorization and verification therefore need to cover extension behavior as well as the shell command interface visible at launch.
The Balkanization SoK adds a limit on what published evidence establishes. Policy-enforcement studies report high failure rates on real denylists, yet no isolation paper in its corpus re-evaluates its defense under that adversarial setting. When evaluating a deployment, teams must distinguish the boundary a study demonstrates from the threat it actually tests.
A practical evaluation framework for engineering leaders assessing agent deployments
Engineering leaders should turn these distinctions into questions about the proposed deployment. Does each task receive an isolated VM with its own kernel and network namespace? Is runc or its equivalent patched, and is agent-generated code prohibited from using host-level privileges? The compute boundary needs an explicit answer. Network review should then establish whether egress is deny-by-default and task-scoped, including whether production infrastructure or unrelated external endpoints remain reachable.
Credential review should ask whether each task gets short-lived, scoped credentials and whether audit logs show which actions came from agents and which came from humans. Rules for where data must stay can also require BYOC. Bringing an API key answers neither question. Authorization review should establish whether approval observes effects in the current workspace, whether invoked tools can conceal harmful behavior, and whether approval fatigue has effectively disabled human review.
State and verification questions complete the assessment. Does snapshotted pre-execution, transactional rollback, or an equivalent mechanism bind approval to the state actually executed? Does pre-PR verification use the same services, network shape, and secrets surface as the deployment, with browser verification where it is needed? Isolated cloud VMs with full Linux workspaces can provide the setting for all these controls, but the runner must implement them explicitly rather than treating cloud placement as proof of containment.
Sources
- The Balkanization of Execution-Security Research for AI Coding Agents: Isolation, Access Control, and Time-of-Check-to-Time-of-Use Vulnerabilities
- Code as Agent Harness
- "Shall We Approve?" Consequence-Aware Approval for Autonomous Coding Agents
- Harness Engineering: Anatomy, Architecture, and Evolution of Coding Agents -- A Source-Code Study of Eleven Systems


