Notes

Human-in-the-Loop (Agent)

Autonomy is welcome right up to the step that cannot be undone — the email that reaches a customer, the migration that drops a column, the payment that clears. Human-in-the-loop is the deliberate decision to stop the agent at those points and make a person say yes.

Where the human is inserted
The pattern is a pause in the loop, not a person watching a screen. The runtime classifies each proposed action; anything crossing a policy line is intercepted before execution and the agent's state is checkpointed. The human sees the exact call — tool, arguments, stated reason — and can approve it, edit the arguments, or reject it with feedback the agent must honour. The run then resumes from the saved state. LangGraph pairs an interrupt with a checkpointer for this, which is what lets the wait last hours rather than seconds.

What makes it fail
The failure is rarely technical. It is approval fatigue: ask about everything and the reviewer learns to click yes without reading, which is worse than no gate at all, because it manufactures a record of consent. Gates belong on irreversible or expensive actions, with the rest allowlisted. Two further traps: a prompt that blocks on a connection that times out, and an approval screen showing a tidy summary instead of the literal arguments — exactly where a prompt-injected instruction hides.

Why it matters
An agent with tool access has an unbounded action space. A human checkpoint is the cheapest way to bound it, and paired with an audit trail it is what makes an autonomous system something an organisation can be accountable for.

Human-in-the-loop is the practice of pausing an agent at a defined point and requiring a person's decision before it proceeds. The runtime checkpoints the agent's state, presents the proposed action with its arguments, and resumes only on approval, edit, or rejection. It bounds the action space of a system that can otherwise act irreversibly, and places accountability for sensitive steps with a named human rather than the loop.

A good contractor gets on with the work without bothering you — but still knocks on the door before taking down a wall. That instinct is what human-in-the-loop builds into software.

An AI assistant working through a task may do dozens of things on its own: reading files, searching, drafting. Then it reaches something that cannot be taken back — sending the email, making the payment, deleting the records — and it stops and asks you first.

The trick is asking at the right moments. Ask about everything, and people stop reading and just say yes, which defeats the point entirely.