Loop Engineering · ~7 min
The inner loop converges one run. The outer loop makes the next run start smarter — if you wire the human's verdicts back into the rules.
Everything so far in this course tunes a single run: name the loop, pick its context, give it a body, detect convergence, gate its cost, cap its blast radius. This lesson zooms out one level. There are two loops, not one — and the slow one is where compounding lives.
The inner loop is the agent grinding toward an objective in a single run. The outer loop is you-and-the-system across runs: the rules, rubrics, verifiers, and prompts that every future run inherits. A flywheel loop closes the outer one — outcomes and human checkpoints from this run become the constraints that shape the next.
The corpus codifies four decision verbs a checkpoint exposes — and the two middle ones are pure improvement signal:
| Verb | Effect on this run | Signal for the outer loop |
|---|---|---|
approve | Continue unchanged | The rules were right — low signal |
edit | Replace the arguments, continue | Right step, wrong specifics — a rule is too loose |
reject | Skip; model re-plans on the rejection | Wrong branch — a guardrail is missing |
respond | Synthesize a tool result from the reply | The human is the tool — automate it later |
A recurring edit at the same checkpoint says your rule under-specifies the action. A recurring
reject says a deterministic guardrail is missing. That is the flywheel input: promote the human verb into
a rule, and next run the loop handles the case itself.
The temptation is to fix things in-flight — patch the prompt this turn, nudge the agent this run. That helps one trajectory and evaporates. The flywheel pushes the lesson down a level: into the completion audit, the rubric, or a separate-context grader that every future run passes through.
outcomes attaches a rubric and runs the grader in a
separate context window "to avoid being influenced by the main agent's implementation choices" —
and reports task success improved by up to 10 points over a standard prompting loop. The grader is a
rule the outer loop wrote down.The mechanism that makes a goal-driven loop converge is the completion audit — the injected demand
to map every requirement to concrete evidence before declaring done, and to reject proxy signals ("tests pass",
"I remember doing this") as proof. Each human reject at the finish line is telling you which requirement
the audit failed to enforce. Add it.
When the agent that did the work is also the auditor — the same-session design — long transcripts produce false-positive completion, the documented LLM-as-judge self-enhancement bias. A separate-context grader is the structural defense. A flywheel built on self-audit just compounds the bias faster.
A flywheel that wakes a human on every iteration does not improve — it saturates the reviewer at machine speed until they approve by reflex. The corpus is blunt: per-iteration checkpoints are the failure mode. Three placements pay back the per-call cost.
budget_limit wind-down — same trigger, wakes a person instead of the agent.interrupt() with a timeout default. interrupt()
waits forever by design — a checkpoint that fires at 2am holds state and produces nothing until someone resumes it.
An unbounded wait is a throughput loss disguised as a safety win.And reach for HITL only as the residual. If a test, lint, schema check, or convergence detector can grade the step mechanically, a human checkpoint is theatre — the verifier is already the stop condition, and the human only adds latency. The empirical baseline keeps you honest: 45.1% of merged Claude Code PRs still required human revision, and at that rate per-action gating would saturate any reviewer before it ever saved time.
edit means a loose rule; a recurring reject means a missing guardrail.Retrieval practice — recall, don't peek
Question 1A human checkpoint inside an agent loop is best understood as…
Question 2A recurring reject at the same checkpoint most directly tells you that…
Question 3Anthropic's outcomes runs its grader in a separate context window mainly to…
Question 4Per-iteration human checkpoints in a high-throughput loop fail because they…
Question 5 · spaced recall from an earlier lessonFrom the convergence lesson: a loop should stop when…