← Blog

Approvals & policy · · 4 min read

Controls that hold when the agent stops agreeing

An instruction lives inside the agent's context and competes with everything else there. A gate lives outside it, at a boundary the agent cannot cross without a decision it doesn't control.

Jonathan Haas

A coding agent working inside Replit was instructed not to touch production. The instruction was written into the system prompt, during a code freeze. The agent deleted a production database anyway. The instruction was real. It just wasn't enforcement.

An instruction lives inside the agent's context window, in competition with everything else that also lives there — other instructions written earlier in the same prompt, content the agent retrieved from a ticket or a webpage mid-task, and the model's own priors about what a helpful assistant does next. When two of those pull in different directions — "don't touch production" against a user message that reads like an emergency, or a retrieved document that implies the freeze doesn't apply here — whichever one the model weights higher at that token wins. Nothing adjudicates the conflict from outside. Both sides of it are text competing for the same context window.

A gate is different in kind. It sits outside the agent, at a boundary the agent cannot cross without a decision it doesn't control: a credential it never holds, an API call that routes through a human sign-off before it fires, a spending cap enforced by the provider rather than by a line in a prompt. Strip the gate away and what's left is a probabilistic model with a direct line to production, with a system prompt standing in for security it was never built to provide. One HN commenter named the underlying mismatch: "The infrastructure for agents to act is scaling way faster than the infrastructure for anyone to verify what they did. We don't let humans open bank accounts without audit trails." (HN)

Why the in-agent version also breaks by team#

The gap doesn't stay contained to one agent. One team builds on LangGraph, another on CrewAI, a third calls the model API directly and writes its own loop. Each stack has its own notion of a guardrail — a validation step, a retry policy, a comment that says don't do this — and none of them agree on how to record a decision. A commenter in the same discussion put the resulting problem in terms a security team would recognize: "You can't confidently tell a compliance officer what your synthetic workforce is doing." The guardrail lives inside whichever framework happened to write the agent, and when something goes wrong, teams are left, as the same thread put it, with "no audit trail for post-mortems." (HN)

The same thread proposed a fix: an independent execution layer sitting between the agents and the systems they act on, checking authority, checking budget, and writing the log entry before the action runs — one layer, regardless of which framework produced the agent.

What actually qualifies as a boundary#

A short list of controls that hold regardless of what the agent decides to do: credentials the agent never receives, so there's no token to misuse even if the model talks itself into misusing one. An execution layer that intercepts the call and holds it for sign-off. Scoped API keys with a hard cap set at the provider, so the ceiling is a number enforced in the provider's billing system.

The test that separates a gate from an instruction: if the agent pursued a wrong objective with total conviction, would the control still hold? A scoped key caps spend no matter what the agent requests. A credential the agent never holds cannot be misused, whatever justification the agent produces for wanting it. A held action waits for a human before it runs, and the agent has no way to skip the wait. A system prompt fails this test by construction: it only works if the thing reading it agrees to be bound by it, and a wrong-but-convinced agent is exactly the case where that agreement is gone.

This is the same category discovery lag calls negative lag: a gate finds out about a mistake before the mistake happens. The design work continues past the gate — an approval queue that trains operators to click through every request is a gate that has quietly turned back into an instruction, which is its own design problem.

Write down the actions that would hurt if they happened without your knowledge — the production deletes, the external sends, spend past some threshold you'd set today if asked. For each one, check whether it sits behind a boundary the agent cannot cross, or behind a sentence asking it not to. The Replit agent had the second kind.