Human-in-the-Loop Gates That Hold: Approving Irreversible Actions

This post is for security and platform leads who are accountable for what agents are allowed to do. It covers one control, the human approval gate in front of irreversible actions. A gate holds only when four things are true. Code outside the model enforces it. The approval is bound to the exact arguments that run. Every failure denies. It fires rarely enough that people still read it. If any of these is missing, you have a button, not a control. Below is how I would build each part, and where I would not use a gate at all.

What the standards already settle

The MCP tools specification says there SHOULD always be a human in the loop who can deny tool invocations. OWASP’s LLM06:2025 Excessive Agency names excessive autonomy as a root cause and recommends requiring a human to approve high-impact actions. That approval can sit in a downstream system or within the extension itself. Its complete-mediation advice goes further: implement authorization in downstream systems rather than relying on an LLM to decide what is allowed.

The guidance leaves the implementation to you. That covers which actions to gate, what an approval binds to, how failures behave, and how often the gate fires.

Classify by reversibility, on the tool definition

Addaly’s lesson on approval gates sorts actions by how hard they are to undo. Some are reversible in one click, some are reversible with effort, and some are not reversible at all. Only the last tier gets a human approval, every time. Addaly also gives a useful test: anything a stranger sees, anything that moves money, and anything you cannot get back.

I would attach that classification to the tool definition and have the dispatcher enforce it centrally. That way no one can add a tool without deciding how it is classified. Do not take the classification from the tool’s self-description, because the MCP spec says clients MUST treat tool annotations as untrusted unless they come from trusted servers. You own the classification.

Enforce it where the model cannot talk past it

Valdemird’s guide to human-in-the-loop control makes the same distinction as OWASP’s complete mediation. System instructions are probabilistic mitigations. The real boundary is deterministic code, such as a denylist or a permission callback.

Some actions should not be reachable at all. OWASP’s first mitigation is to limit the extensions an agent can call to the minimum necessary. When an action has no legitimate use in the agent’s job, I would apply that limit before building any approval prompt. Remove the tool, and make sure the credential lacks the permission.

Bind the approval to what executes

I would check this first in any design review, because it is where a gate quietly stops holding. Valdemird describes the bug. If the input is re-derived from the model between the human’s tap and the execution, the human approved A and the system does B. The fix is to persist the normalized action, show it, and execute the persisted record. I would render the preview from those persisted arguments and never from the model’s summary of its intent.

The agent-approval-gate library shows what failing closed looks like:

The README also records the library’s own gap. Because it classifies by tool name, a query_db tool pinned as read still ran a DELETE FROM users carried in its arguments. The damage was in the arguments, so your gate predicates should read the arguments too.

When a human denies a call, the library feeds the denial back to the model as the tool result. The agent then reasons about the refusal instead of crashing. I would keep that behavior.

Keep the gate rare

Addaly warns that gating actions that are reversible in one click trains people to click Approve without reading. Valdemird adds that an Approve button can make safety worse when it creates a false sense of control. A gate stays credible only if it interrupts seldom.

When a gate is the wrong control

Do not put a per-action gate on actions that are genuinely reversible. For those, Addaly’s advice is to let the agent act, log the action clearly, and provide a visible undo. For high-volume reversible automation, I would use sampling and post-hoc review instead.

High-volume irreversible actions are different. A heavy review burden does not justify dropping protection the action needs. I would look for a way to make the action reversible, or to batch the review. The library shows every pending write together and takes one decision per call. If neither works, the agent probably should not hold that tool.

Start by listing the irreversible tools. Write their policy into the dispatcher and make it read the arguments. Bind each approval to what will execute, and deny on every failure. Then watch the approval rate. If a gate is almost never rejected, investigate before you narrow it. It may be catching reversible actions that belong in a lower tier, or its reviewers may lack the context to say no. Narrow the gate only in the first case.