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

Production5 min readFirst readThe Agent LoopTool Surface Design

After this section you can

  • Place approval gates by reversibility rather than gating everything and training people to click through
  • Run the confirmation round trip, and avoid the id mismatch and dropped-stream deadlock that hang a session
  • Write denials that redirect the agent instead of stalling it
  • Design an unattended run that shrinks its tool surface rather than pausing for a human who is not there
17

Human in the Loop: Approval Gates

An autonomous agent is one rm -rf away from being a very expensive incident. The gate is not a dialog you bolt on at the end — it is a decision about which actions the harness is allowed to see coming.

THE CENTRAL IDEA

Between the model deciding to act and your code acting there is a seam, and that seam is the only place a human can stand. A permission policy lives there: some tools run automatically, some pause the loop until someone answers. The critical part is what a denial does — it is not an exception and it is not the end of the run. A denial with a reason goes back to the model as a tool result, and the agent replans around it. Gates that just fail leave the agent confused; gates that explain make it smarter.

The gate sits between decide and execute — and a denial is just another tool result
MODEL DECIDES emits tool_use POLICY GATE always_allow → run always_ask → pause EXECUTE your code runs HUMAN DECIDES session idle meanwhile TOOL RESULT goes back to the model next turn Approved or denied, the outcome re-enters as a tool result — so a denial that carries a reason lets the agent replan instead of stalling.

Related

More in LLM & Agentic

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

Unlock Premium