Lesson 16 / 25
A Catalogue of Loop Failures
Name the common failures and match each to the guard that catches it.
Name it to fix it
Repetition: the same call again and again. Thrashing: trying many different fixes that all fail. Drift: wandering away from the original goal. Context bloat: history grows until quality drops. Silent overspend: every step is fine but the total is huge. Each has a different guard, so logging which one happened tells you what to improve.
What goes wrong
Most loop incidents are one of a few patterns: repeating, thrashing on errors, or quietly overspending.
Failure to guard map
Use this table as a checklist when reviewing a loop.
Failure Guard
Repetition RepeatGuard on (tool, args)
Thrashing cap consecutive tool errors; escalate
Drift restate goal each N steps; verify against goal
Context bloat clip results, summarise, offload
Silent overspend total token and cost budgetQuick check: Every step is cheap but the run costs a lot overall. Which failure is this?
- Repetition
- Silent overspend
- Drift
- Syntax error
Answer
Silent overspend — Only a total budget notices cost that accumulates across many individually fine steps.