Who decides the sequence — the model, your code, or a negotiated split — and how a loop knows it is finished rather than merely tired. Six topics on the control structure around the model: the spectrum from pipeline to free loop and where each task type belongs on it, subtasks held as state so nothing is silently dropped, what a reasoning trace is and is not evidence of, the four ways a run must be able to end, a state machine that makes a loop predictable without making it a pipeline, and the measured difference between a critique that checks something and one that admires itself.
6 topics
The Sundry agent handles the shelving-unit ticket by improvising, and improvisation is fine right up to the turn where it forgets the second intent. Three problems arrived in one paragraph — a cracked side panel, a duplicate $9.95 delivery charge, and a refusal of any replacement — and the run that solves the interesting one beautifully while never mentioning the billing error closes as a success. Nobody sees it until the same buyer files a second ticket four days later.
Everything up to here has been about what the agent knows. This chapter is about what it does with the turn it has: which parts of the sequence belong in code because they never vary, which belong to the model because they are judgements over prose, and what has to be true before the run is allowed to move money. Six topics, and the connective tissue is that every one of them replaces something the model was being trusted to remember with something your code enforces.
Two of these carry beyond the chapter. Topic 39 gives the loop four different ways to end and insists they stay distinguishable — a run that finished, a run that gave up on purpose, and a run that got stuck are three different signals, and one shared "done" flag destroys all three. It also settles the twelve-turn limit with two independent measurements rather than one, which is the honest way to defend any number in this book. Topic 41 puts a figure on self-correction that nobody enjoys: code validation plus one grounded critique before money moves caught 61% of would-be policy errors, and asking the model to review its own answer caught 9%. The gap between those is the argument for every guard in this chapter.
One ticket, four control shapes: what each one costs and what each one can no longer do
Fixed pipeline
1 call · $0.02 — picks one intent, silently wrong about the other two
Model-chosen branch
2 calls · $0.05 — branches correctly, still answers only that one intent
Plan then execute
8 calls · $0.23 — the plan stops being right when the carrier scan arrives
Free-running loop
9 calls · $0.21 — handles all three, and one run in eight drops the dullest
Your code owns the sequenceThe model owns the sequence
Predictable, testable, priced in advance — and wrong before it starts on any ticket it was routed to wrongly.Roughly ten times the cost, and the failure moves from wrong-by-design to losing track of what it was doing.