ARMORIQ

The Sandbox Was Never the Whole Story

What bringing KAP to Claude Code in Docker sandbox taught us about the difference between isolating an environment and governing the work inside it.

Nov 5, 20266 min read
The Sandbox Was Never the Whole Story// Cover

We have brought ArmorIQ’s Kernel Assurance Plane (KAP) to Claude Code inside Docker Sandboxes. While doing it, we learnt some lessons that we want to share.

See it here in action:

The goal was straightforward: let the agent do useful work, enforce the authority granted to its task, and make that authority revocable while it was running. Then we encountered a problem that had nothing to do with model behavior. Our security setup could run inside the sandbox without binding the agent that would later work inside it. The reason was a process tree.

The policy was there. The agent was elsewhere.

KAP associates a process with an intent group, or igroup, carrying its executable authority. That binding passes from parent to child. Our integration therefore needed to establish the binding before the agent started, in a process from which the agent would inherit it. A startup hook seemed like a natural place.

But in the Docker Sandboxes launch arrangement we were integrating with, the hook ran during creation and exited before the agent began. The sandbox runner launched the agent separately. The hook was not the agent’s parent. It was beside the agent, not above it. Binding the hook did not bind the agent.

This was not a sandbox escape. It was not evidence that Docker’s isolation had failed. It was a mismatch between where we installed our enforcement context and where execution actually began.

Being inside the same environment did not establish the authority relationship we needed.

That distinction became the central lesson of the integration.

A task needs more than an environment

A sandbox answers an important question: where can this workload execute, and what can it reach? We were asking an additional question: under whose authority is this particular execution proceeding, and is that authority still valid? Those questions are related, but they are not interchangeable.

An agent’s task becomes a running process. That process launches programs, opens files, and creates children. The authority established for the task has to remain attached to that execution, not merely exist in a configuration file or in a setup process that has already exited.

And the relationship has to work in both directions. It must establish what execution is allowed when the task starts, and it must let the system withdraw that authority when the task is already underway. That is the role we are building for KAP.

The kernel does not need to understand the user’s prompt. It needs a concrete authority context associated with the process performing the work, and enforcement points that check operations against it. Our startup-hook problem exposed the first requirement before we could meaningfully test the second.

We stopped trying to catch the agent

The solution was to move the binding into the agent’s own launch path. We built a Docker Sandboxes kit whose entry point is a small launcher. That launcher first binds its own process into the intent group. It then uses exec to become Claude Code in place. There is no separate agent process to find afterward. The process that receives the binding is the process that becomes the agent. Its children inherit that binding.

Bind first. Then become the agent.

The launcher and grant are root-owned in this setup, keeping those components outside the managed agent’s control. This is a small change in the launch sequence, but it changes the enforcement relationship completely. We are no longer depending on a neighboring setup process or trying to attach authority after work has begun. The agent starts within the authority context intended for it.

The useful result was ordinary work

Once that relationship was established, the first successful result was deliberately unremarkable. Claude Code wrote a file and read it back. That matters. A system that prevents an agent from doing anything has not solved the problem. The point is to preserve useful execution while enforcing a boundary around it.

In the same bound environment, attempts to launch curl and the Docker client were denied. The kernel records identified the intent group, executable, authority epoch, and reason for rejection.

These were execution denials: the launches of /usr/bin/curl and /usr/bin/docker were blocked. They were not evidence that every possible network path or Docker-service interaction had been tested.

But they established something concrete. The permitted file operation succeeded, while the disallowed program launches failed at the enforcement layer. The agent did not have to agree with the decision.

The process was still running. Its authority was not.

The more consequential test came after execution had started. While a task was running, we advanced its authority epoch from zero to one. The existing binding now referred to an older generation. The next file access shown in the run was denied because its authority was stale. The run subsequently stopped. The important event was not simply that an agent stopped. It was why the operation was rejected: permission granted at launch was no longer sufficient.

That is the distinction between the lifetime of a process and the lifetime of its authority. A process can continue to exist after its authorization changes. Starting successfully should not entitle it to retain yesterday’s permissions indefinitely. Nor should withdrawing authority depend on that process voluntarily applying a new restriction to itself.

In this test, the boundary became effective at the next covered file check. That is the demonstrated result, not a claim that revocation reverses completed effects or cancels every operation already in flight.

What we are really building

We began this integration with an enforcement mechanism. Making it useful required getting the relationship between the runtime, the launch path, and the agent’s execution right. The startup hook taught us that configuration is not binding. The allowed file operation and denied program launches showed why the boundary must be selective. The epoch change showed why authority needs a lifecycle distinct from the process carrying it.

Together, these experiences point toward the foundation we want agent runtime frameworks to share: an explicit association between a task’s authority and the execution that realizes it, maintained from launch through subprocess creation and revocation.

Sandboxes remain essential. KAP is not a reason to remove them. Our work is about making task authority enforceable within the environments agents already use.

We invite agent runtime framework developers and systems engineers to help test that relationship in their own launch paths and workloads. The difficult cases are precisely where the next improvements will come from: independently launched workers, inherited execution, and authority changes while work is still happening.

Putting an agent in a sandbox establishes where it can work. Binding its authority establishes the conditions under which it may keep working.

Onboarding open

Ready to control what your AI agents actually do?

Join the teams shipping safer, compliant AI agent deployments. White-glove onboarding for the first 50 design partners.

Read Docs →
Live Intent Assurance↗