1:1 mentoring with Big Tech AI engineers
LLM & Agentic

Human in the Loop: Approval Gates

Approval gates for autonomous agents — placing them by reversibility, the confirmation round trip and the deadlocks it hides, denials that redirect rather than stall, and what to do when no human is watching.

Last updated

Production9 min readFirst readThe Agent LoopTool Surface Design

After this section you can

  • Place approval gates by reversibility and blast radius instead of gating everything
  • Run the confirmation round trip and write denials that redirect the agent
  • Design an unattended run that shrinks its tool surface instead of waiting for a human
14

Human in the Loop: Approval Gates

Between the model asking for an action and your code performing it there is one seam, and it is the only place a person can stand. Put gates there by reversibility, make the pause cheap, and let every denial teach the agent something.

Key idea

Gate by reversibility: reads and undoable writes run, anything irreversible waits for a human. The gate lives in your code, not the prompt. Approved or denied, the outcome goes back to the model as a tool result, so a denial with a reason redirects the agent instead of stalling it.

The gate sits between the model’s request and your code’s action. Every outcome goes back as a tool result.
1 · Model emits tool_use refund($840) 2 · Gate in your code policy per tool + args Run it easy to undo A human decides hard to undo · run paused Deny with a reason policy says no, or the human did allow ask deny yes no 3 · tool_result output, or the denial and why, as is_error 4 · next turn: the model reads the outcome and replans A denial is information the agent can act on, so say why.

Related

More in LLM & Agentic

Get full access to all 74+ sections with code examples, diagrams, and interactive animations.

Unlock Premium