← Blog

Approvals & policy · · 3 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 told, in its system prompt during a code freeze, not to touch production. It deleted a production database anyway. The instruction was real and enforced nothing.

An instruction lives inside the agent's context window, in competition with everything else there: earlier instructions in the same prompt, content retrieved from a ticket or webpage mid-task, and the model's own priors about what a helpful assistant does next. When two of those pull apart, such as "don't touch production" against a user message that reads like an emergency, or a retrieved document implying the freeze doesn't apply here, whichever the model weights higher at that token wins. Nothing adjudicates from outside, because both sides are text in the same context window.

A gate 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 instead of by a line in a prompt.

Without the gate, a probabilistic model has a direct line to production, and a system prompt stands in for security it was never built to provide. One HN commenter named the 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#

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 guardrail (a validation step, a retry policy, a comment that says don't do this), and none agree on how to record a decision. A commenter in the same discussion put it in terms a security team recognizes: "You can't confidently tell a compliance officer what your synthetic workforce is doing." The guardrail lives inside whichever framework wrote the agent, and when something goes wrong, teams are left, as the thread put it, with "no audit trail for post-mortems." (HN)

The same thread proposed an independent execution layer between the agents and the systems they act on, checking authority and budget and writing the log entry before the action runs, one layer whichever framework produced the agent.

What actually qualifies as a boundary#

Three controls hold whatever the agent decides:

  • Credentials the agent never receives, so there's no token to misuse even if the model talks itself into it.
  • An execution layer that intercepts the call and holds it for sign-off.
  • Scoped API keys with a hard cap set at the provider, a ceiling 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. A held action waits for a human, and the agent cannot skip the wait. A system prompt fails this test by construction: it works only if the reader agrees to be bound, and a wrong-but-convinced agent is exactly the case where that agreement is gone.

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

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