Part 3 · Stopping Well

Loop Engineering · ~7 min

Termination & Convergence Detection

"It looks good enough" is not a stopping criterion. Replace the gut-feel halt with three signals you can measure across passes.

Why this, for you: refinement loops — plan polishing, critique passes, doc drafts — have no natural stopping point. You either stop too early and ship an unresolved issue, or over-refine and burn compute on passes that change nothing. For code you have tests. For prose, specs, and design docs there is no machine-checkable gate — so you stop on a feeling. This lesson gives you a mechanical one.

When a task has a test harness, stopping is solved: tests pass → stop. That is the PASS/FAIL gate an evaluator-optimizer leans on. Convergence detection fills the gap for everything that can't be unit-tested — by watching how the output moves between consecutive passes instead of guessing at its quality.

1 The three signals

Monitor these across consecutive refinement passes. They are observable — you can compute each one from two adjacent drafts without judging quality:

SignalConvergingDiverging
Change velocityrate of edits slows — pass N changes 30%, pass N+3 changes 2%rate stays high or accelerates
Output sizesize stabilises or shrinks — additive passes exhaustedsize grows — scope creep, not refinement
Content similaritydiff between passes shrinks toward zerodiff stays large — issues unresolved
Stop only when all three signals converge simultaneously. If any one diverges, substantive issues remain and more passes are warranted. One quiet signal is not consensus.

Notice that growing output is a divergence signal, not progress. A pass that keeps adding words is drifting scope, not closing in — refinement subtracts and tightens more than it adds.

2 When convergence means restart, not stop

Three patterns mean the loop is stuck and needs a restart — a redesign or external input — rather than another pass:

Convergence measures stability, not correctness

The signals tell you the output has stopped moving — not that it is right. On RefineBench (1,000 problems, 11 domains), self-refinement without external feedback gained ≤1.8 points over five iterations, and frontier models routinely halted early on overconfidence while errors remained. A stable state can be self-bias, not quality. For high-stakes outputs, pair convergence with an external checker — tests, a second model, or a human.

3 The five-pass blunder hunt

For critical outputs — major design specs, agent system prompts, architectural decisions — run the identical critique prompt five consecutive times against the same output. A single critique pass produces false confidence; each repeated pass surfaces issues the previous one normalized over, forcing examination of progressively subtler problems.

# Five-pass blunder hunt — same prompt, watch the diffs converge Pass 1 -> 2: 40% lines changed, +200 words # diverging Pass 3 -> 4: 15% lines changed, size stable # partial Pass 4 -> 5: 3% lines changed, diff near-zero # all three converge -> STOP

This is convergence detection applied to a critique loop: when pass 4 and pass 5 produce near-identical critiques with no new issues, content similarity has converged and the output is stable. Running a sixth pass would likely produce cosmetic churn that introduces unnecessary variation and may degrade quality.

4 Pick the right stopping mechanism

Convergence detection is one of four tools — match it to the task:

MechanismWhen to use
Convergence detectionprose, specs, design docs — no test harness available
PASS/FAIL from evaluatorcode tasks with executable tests — machine-checkable
Max round limitfallback for all loops — prevents runaway iteration
Model self-declarationlow-cost tasks where precision matters less
Always pair convergence detection with a hard max-round limit. Production tools do this: VS Code's Advanced Autopilot uses a transcript-reading judge to decide loop completion, bounded by a maximum of three loops — an evaluator coupled with a max-round floor, not either alone.

↪ Your win: a halt you can defend

Retrieval practice — recall, don't peek

Question 1You should stop a refinement loop when…

Question 2An output that grows in size each pass is a sign of…

Question 3Oscillation, expansion, and a low-quality plateau all call for…

Question 4Convergence signals tell you the output is stable, but not that it is…

Question 5 · spaced recall from an earlier lessonBefore you debug a misbehaving loop, the first move is to…

Ask me anything. Want help wiring a diff-and-size check into a real critique loop, or deciding the max-round cap for a spec you're polishing? Next in Part 3: Go / No-Go — When a Loop Earns Its Cost — gating each iteration so you spend a turn only when the expected gain beats the budget it burns.
✎ Feedback