Lesson 05 · Structure · 12 min
Human in the loop
Some actions should not happen without a person. The weak way to arrange this is to instruct the agent to ask first. The strong way is to make the pause part of the structure: execution reaches a node, stops, and does not continue until a decision arrives.
The difference is not about how often it works. It is about what is possible. An instruction can be misread, argued around, or lost in a long context. A node has no such surface — nothing downstream of it runs until a decision is supplied.
Interrupts change what the runtime must do: it has to be resumable. Run until the interrupt, hand back the state, and later continue from that node with the decision added. This is why graph frameworks talk about checkpointing — resuming is the feature, and persistence is what makes it survive a restart.
Design the pause for the person, not the machine. They need the recommendation, the evidence behind it, and an obvious way to say no. The guarded graph here recommends an action first, so the human approves a specific proposal rather than an abstraction.
Put the interrupt immediately before the irreversible step, not at the start. Approving a plan is not the same as approving the action it ends in, because everything in between can still change what actually happens.
Checkpoint
Produce one approved run and one refused run, and note where execution paused in each.