Building an AI Agent With Human-in-the-Loop Approval

Table of contents
Human-in-the-loop approval works when the agent proposes an action and genuinely cannot proceed until a person says yes. It fails the moment “approval” becomes a formality: a modal someone clicks through without reading, a notification that arrives after the action already happened, or a pending request that silently expires into an automatic yes. The pattern only does its job if stopping is the actual default, not a polite suggestion.
Three states, not two
Most designs that get this wrong only model two states: the agent decides, then it acts. Human-in-the-loop needs three: propose, pending, and resolved. Between “the agent decided this is the right action” and “the action actually happened,” there has to be a state that exists independently of the agent, that a person can see, and that nothing proceeds past without an explicit decision.
That middle state needs to be a durable record, not a transient UI element. If the approval request is just a chat message or a modal that disappears when a tab closes, the action’s fate depends on infrastructure that was never designed to be the thing standing between a proposal and an irreversible change.
flowchart LR
accTitle: Propose, pending, resolved
accDescr: An agent proposes an action, which creates a durable pending record. A human reviews the pending record and either approves or rejects it. Only an approval leads to execution; rejection or expiry discards the action without it ever running.
PROPOSE[Agent proposes an action]
PENDING[(Durable pending record)]
HUMAN{Human reviews}
EXEC[Action executes]
DISCARD[Discarded, nothing happens]
PROPOSE --> PENDING --> HUMAN
HUMAN -->|approve| EXEC
HUMAN -->|reject or timeout| DISCARD
The gate belongs at the tool boundary
Put the approval check in the tool itself, so execution is structurally impossible without a resolved, approved record to point to. Putting the gate in the agent’s reasoning instead, a prompt instructing it to “ask before doing this,” is the same mistake unsafe-action prevention runs into generally: a request to the model isn’t a constraint on the model. The tool should refuse to execute at all if it can’t find an approved record for this specific proposed action, independent of what the agent believes it already confirmed.
What a good approval request actually shows
A person approving an action needs to see what will actually change, not a summary of what the agent intends in general terms. “Update the customer’s shipping address” is not enough to approve against. “Change shipping address from 12 Rue de Paris to 45 Elm Street for order #48213” is. The difference between those two is the entire value of the approval step: a reviewer can only catch a mistake they can actually see.
Step by step
- Model propose, pending, and resolved as three separate states, backed by a durable record, not a transient notification.
- Show the concrete diff, not a description of the action’s category. What’s changing, from what, to what, affecting which record.
- Put the gate in the tool, so execution requires a resolved, approved record to exist, and refuses outright if it doesn’t.
- Give pending actions an expiry. An approval granted against week-old state shouldn’t execute against today’s state without a fresh check.
- Log who approved what, and when, alongside the full diff that was shown to them at the time. This is both an audit trail and the fastest way to answer “why did this happen” later.
Pitfalls
- Approval fatigue. Routing every low-stakes action through a human gate trains people to approve without reading, which defeats the purpose for the handful of actions that actually matter. Reserve the gate for genuinely high-stakes or irreversible actions, and let low-stakes ones through automatically.
- Approving stale state. If the underlying record changed between proposal and approval, the diff the human saw may no longer match reality. Re-validate against current state at execution time, not just at proposal time.
- No record of the reasoning. An approval log that shows “approved” with no context doesn’t help anyone understand, months later, why that specific exception was made.
FAQ
Should every agent action require human approval?
No. Reserve approval gates for actions that are irreversible or high-stakes. Gating everything causes approval fatigue, where the volume trains reviewers to click through without reading, which quietly removes the protection for the actions that actually needed it.
What happens if a pending approval expires?
It should be discarded, not auto-approved and not auto-rejected silently. If the underlying task still needs to happen, the agent should propose it again against current state, so whatever gets approved reflects what’s actually true at approval time.
Can human-in-the-loop approval work for high-volume, low-latency workflows?
It works best for workflows where a short delay is acceptable. For genuinely high-volume, low-latency actions, combine approval with the other layers from preventing unsafe actions: tight capability boundaries and reversibility by default, so most actions don’t need a human gate at all, and the ones that do are rare enough that the delay doesn’t matter.


