AI agents
Capability Control, Approvals, Sandboxing, and Rollback
Build layered controls that limit what an agent can access, execute, commit, and leave behind.
By the end you can
- Define agent containment controls as an operational contract rather than a capability label
- Contrast Advisory mode with Staged mode in “An infrastructure agent made a reversible plan and an irreversible change”
- Trace “Approval can become ceremonial when evidence is unreadable or requests are too frequent” through a concrete execution path
- Produce “Design a layered containment plan” with evidence for “A compromised or mistaken run cannot access unrelated tenants or environments”
Containment is four different limits, and the boundary itself is code
Capability control constrains the resources, operations, destinations, and time windows available to an agent. Approvals, sandboxes, staging, transactional design, and rollback reduce the consequences of imperfect planning or hostile inputs. Each limits a different thing: what the agent can reach, what it can do once there, when it commits, and what can be undone afterwards.
Containment is not one switch. A sandbox can restrict execution and still allow harmful network access, data exfiltration, excessive cost, or destructive changes inside its boundary. And the boundary is not a law of nature. It is software, and software has a version number and a CVE.
The reference Filesystem server of the Model Context Protocol had two ways of reaching files outside its allowed directories. Both were disclosed on 1–2 July 2025. CVE-2025-53109 bypasses path validation through prefix matching and symlink handling. CVE-2025-53110 does it through a colliding path prefix. Both scored 7.3, High. Both were fixed by upgrading to 0.6.4 or 2025.7.01.
The advisory for the first states the mechanism plainly: “Versions of Filesystem prior to 0.6.4 or 2025.7.01 could allow access to unintended files via symlinks within allowed directories.” The allow-list was configured correctly. A symlink placed inside a directory the agent was permitted to read carried the read out of the permitted set. One of the four limits — reach — failed on its own. The other three were never consulted.
A sandbox answers only one of the four questions, and an agent that cannot escape it can still spend, send, and destroy everything inside it.
Case
CVE-2025-49596: MCP Inspector, scored 9.4
A missing check is worth a concrete example. Versions of MCP Inspector below 0.14.1 allowed remote code execution. Nothing authenticated the traffic between the Inspector client and its proxy, so unauthenticated requests could launch MCP commands over stdio. The advisory, issued in June 2025, scored CVE-2025-49596 at 9.4 and called the flaw missing authentication for a critical function. The fix shipped in 0.14.1.
Set it beside the two Filesystem advisories of the following month. The pattern is the same. In the Inspector, the check that should have stood between a request and command execution was absent. In the Filesystem server, the check existed and could be walked around by prefix matching and symlink handling. Containment is not a property of the model. It is a property of what the model is allowed to reach. That reach is written in code, and the code is versioned, scored, and occasionally wrong.
Visual
A sandbox holding a live credential contains nothing
Containment is layered rather than switched on. Least privilege, Isolation, Commit gates, and Reversibility each catch a different mistake. Least privilege is not a slogan here but a published tenet: NIST SP 800-207 grants access to individual enterprise resources on a per-session basis, with the least privileges needed to complete the task. Reversibility and Kill and recover need owners of their own, and tests of their own. The Knight Capital order later in this lesson is what an untested recovery step costs. No single layer holds on its own. A sandbox with a live credential in it is a sandbox in name only, and a directory allow-list is only as good as the path-validation code underneath it.
- 1
Least privilege
Expose only the tools, records, and destinations required now.
- 2
Isolation
Separate tenants, environments, filesystems, networks, and credentials.
- 3
Commit gates
Require review or policy authorization before material side effects.
- 4
Reversibility
Prefer staging, transactions, compensation, versioning, and backups.
- 5
Kill and recover
Support revocation, pause, rollback, repair, and evidence preservation.
Example
UniSuper: two geographies, one subscription, one deletion
Blast radius comes first, and it is measured by what disappears together. On 8 May 2024 UniSuper and Google Cloud jointly disclosed that a misconfiguration during provisioning had deleted UniSuper's Google Cloud VMware Engine Private Cloud subscription. It went in both of the geographies UniSuper used for redundancy. Google Cloud's incident report of 24 May 2024 traced the deletion to one input parameter left blank in an internal provisioning tool. The system assigned an unknown default fixed one-year term. At the end of that term the Private Cloud was deleted, with no customer notification.
Two geographies sounded like two copies. They were two copies inside one subscription, and the subscription was the unit that was deleted. The layer that actually held was the one outside that unit, and the joint statement says which it was: “UniSuper had backups in place with an additional service provider. These backups have minimised data loss, and significantly improved the ability of UniSuper and Google Cloud to complete the restoration.”
Ask an agent the same question in advance. Name the thing that would have to fail for every copy to go at once. Then check that at least one copy is not inside it.
- Signal 1: A compromised or mistaken run cannot access unrelated tenants or environments. Redundancy that shares a control plane is one environment wearing two names. Both UniSuper geographies went with the one subscription.
- Signal 2: High-impact effects require a distinct commit decision. The deletion arrived at the end of the unknown default fixed one-year term, with no customer notification. No gate, no second look, no separate act of committing.
- Signal 3: The system can recover from partial execution without duplicating actions. Restoration was possible because backups sat with an additional service provider, outside the system that made the mistake.
- Signal 4: Approval burden is low enough that reviewers inspect material evidence. One input parameter left blank in an internal provisioning tool passed unremarked. The defect was invisible precisely because nothing asked anyone to look at it.
Example
One credential across staging and production is a violation of tenet 3
A correct configuration diff was generated. It was then applied to the production project, because the same credential covered staging and production. No approval separated preview from commit. One key opened both, so the diff and the damage were one step apart.
A numbered standard is written against that failure. Access to individual enterprise resources is granted on a per-session basis, with the least privileges needed to complete the task. That is the third basic tenet of NIST Special Publication 800-207, Zero Trust Architecture, published in August 2020. The tenet then closes the door the shared credential leaves open: “However, authentication and authorization to one resource will not automatically grant access to a different resource.”
Read that as an engineering requirement rather than a principle. The staging project and the production project are two resources. A credential that authorizes the agent for the first must not, by that fact alone, authorize it for the second. The authority has to be issued per session, scoped to the resource in hand, and expire. Where one key opens both, the containment argument for the whole run reduces to the hope that the agent addresses the right project. Hope is not a limit on reach.
- Decision at stake: Build layered controls that limit what an agent can access, execute, commit, and leave behind — beginning with whether a single credential spans two resources that must not fall together.
- Hidden assumption: A sandbox makes an agent safe regardless of its network and credential access. Tenet 3 of NIST SP 800-207 is the direct contradiction: authorization to one resource does not carry to a different resource, and a credential that behaves otherwise has already left the sandbox.
- Primary control question: Approval can become ceremonial when evidence is unreadable or requests are too frequent. Here there was no approval at all between the preview and the commit, only the same key used twice.
- Evidence to collect: A compromised or mistaken run cannot access unrelated tenants or environments, demonstrated by per-session authority with the least privileges needed to complete the task, not by a policy document asserting separation.
Key idea
Measured clickthrough: 70.2% of Chrome SSL warnings, up to 96% of drug safety alerts
A user may click through a dense diff, a vague explanation, or hundreds of low-value prompts. The system records consent without creating meaningful control. That claim is not a guess about human nature. It has been measured on populations, twice, in two unrelated fields.
Browsers put a warning in front of people, and most people walk through it. In 2013 Akhawe and Felt measured that in Firefox and Chrome telemetry, across more than 25 million warning impressions. Real browsers, not a laboratory. Users continued through a tenth of Firefox malware and phishing warnings, a quarter of Chrome's, and a third of Firefox SSL warnings. Then comes the number that matters for anyone designing a commit gate: “In contrast to the other warnings, users continued through 70.2% of Google Chrome's SSL warnings.” The same users, the same threat, four rates. The rate is a property of the prompt, not of the person reading it.
Professional training does not repair it. A 2006 review in the Journal of the American Medical Informatics Association pooled 17 studies of how physicians respond to drug safety alerts in computerized physician order entry systems. Its finding: “Drug safety alerts are overridden by clinicians in 49% to 96% of cases.” The overrides are attributed to error-producing conditions in the alerting system itself — low specificity, low sensitivity, unclear information content and unnecessary workflow disruptions. A reviewer who approves ninety requests an hour is a log entry, not a check. The fix is in the alert, not in the reviewer.
Europe has already turned this into drafted obligation. The Artificial Intelligence Act, Regulation (EU) 2024/1689, was published in the Official Journal on 12 July 2024. Article 14(4)(b) requires that overseers be enabled “to remain aware of the possible tendency of automatically relying or over-relying on the output produced by a high-risk AI system (automation bias), in particular for high-risk AI systems used to provide information or recommendations for decisions to be taken by natural persons”. Article 14(4)(e) requires the ability to interrupt the system through a 'stop' button or similar procedure that brings it to a halt in a safe state. Article 14(5) requires, for the biometric systems in point 1(a) of Annex III, that no action or decision be taken unless the identification has been separately verified and confirmed by at least two natural persons. Notice what those three ask for. Not more prompts, but an overseer who is still able to act. Present concise consequences, risky deltas, evidence, and alternatives; reserve approval for material transitions.
An approval queue nobody can read turns a human check into a signature, and the signature is what the incident review will find.
Steps
Design a layered containment plan, and test the rollback before you need it
Plan containment for a specific workflow rather than in the abstract, because the layers depend on which credentials and environments that workflow already touches. Partition the environment. Scope each credential to resource, action, destination, budget and expiry. Stage material changes as previews or pending transactions. Place informed approvals. Exercise rollback.
The last step is the one that gets written down and never run. A regulatory order describes what that costs. On 1 August 2012 new code was copied to only seven of Knight Capital's eight SMARS servers, with no second-technician review. The eighth server still carried retired “Power Peg” code, which a repurposed flag activated. In roughly 45 minutes SMARS produced over 4 million executions in 154 stocks, for more than 397 million shares and a loss of over $460 million. Knight had no incident-response procedures. The SEC's order of 16 October 2013 records what the recovery attempt did: “In one of its attempts to address the problem, Knight uninstalled the new RLP code from the seven servers where it had been deployed correctly. This action worsened the problem, causing additional incoming parent orders to activate the Power Peg code that was present on those servers, similar to what had already occurred on the eighth server.” Knight paid a $12,000,000 civil money penalty for violating Rule 15c3-5.
Every layer in the plan appears in that passage as an absence. The deployment was partial and no second technician checked it. The stale code path was still reachable, so nothing limited what the system could run. The rollback was improvised during the incident, on a partially deployed fleet, and it spread the failure to the seven servers that had been correct. Exercising rollback means running it. On a system in a partial state. Before the day when four million executions depend on it.
- 1
Partition the environment
Separate production, staging, tenants, and sensitive networks.
- 2
Scope each credential
Bind resource, action, destination, budget, and expiry.
- 3
Stage material changes
Generate previews, diffs, or pending transactions before commit.
- 4
Place informed approvals
Show what will change, why, and how to recover.
- 5
Exercise rollback
Test compensation, restore, credential revocation, and cleanup of partial state.
Widening authority is the one step you cannot take back
Begin deployment in advisory or staged mode. Expand direct authority only after the same controls and evaluations demonstrate bounded, recoverable behavior. Recoverable means demonstrated, in the way Knight's uninstall was not.
Before widening a permission, look again at the way approval degrades. Look at it as a measured rate rather than a worry. 70.2% clickthrough on Chrome SSL warnings, across more than 25 million impressions. 49% to 96% override on drug safety alerts, across 17 studies. Adding an approval step to a wider permission does not restore the containment the wider permission removed. It adds a prompt to the pile that produced those rates. The check that tells you containment still holds is the structural one you started from, tenet 3 of NIST SP 800-207: authorization to one resource does not carry to another. Its operational form is simpler still. A run gone wrong still cannot touch an unrelated tenant or environment.
Widening authority is easy to do and hard to undo, so the staged path is the last point where the decision still costs nothing.
Key takeaways
- Capability control constrains the resources, operations, destinations, and time windows available to an agent — and the code enforcing it is itself versioned and fallible. CVE-2025-53109 and CVE-2025-53110, both scored 7.3 High, let an agent read outside its allowed directories via symlinks and colliding path prefixes.
- Containment is not one switch. NIST SP 800-207 grants access per session with the least privileges needed to complete the task, because “authentication and authorization to one resource will not automatically grant access to a different resource.”
- Expose only the tools, records, and destinations required now. A single credential covering staging and production puts the diff and the damage one step apart.
- Separate tenants, environments, filesystems, networks, and credentials. UniSuper's two geographies sat inside one Google Cloud VMware Engine Private Cloud subscription, which a blank input parameter deleted, and only backups held with an additional service provider survived it.
- Present concise consequences, risky deltas, evidence, and alternatives; reserve approval for material transitions. Measured clickthrough runs to 70.2% on Chrome SSL warnings, and clinicians override drug safety alerts in 49% to 96% of cases.
- Begin deployment in advisory or staged mode, and expand direct authority only after controls and evaluations demonstrate bounded, recoverable behavior. Knight Capital's untested rollback, run live on seven of eight SMARS servers, worsened a failure that reached over $460 million in roughly 45 minutes.