How do you make sure a loop, like a retry or an agent, always stops, and notice when it is going in circles?
- Module
- 01/05
- To read
- ~7 min
A self-correcting review agent was set to fix a tricky authentication module, looping until the code was clean. What do you think happened?
In the module you make your guess first, then read what happened and why.
Every loop must define a convergence metric
Hard iteration bounds are non-negotiable
Divergence detection triggers early halt
Oscillation detection requires state history
A stop plan for one loop
A spec for your own app, as a text file you download. The module also gives you the prompt for Claude Code, Codex or Antigravity, a checklist to check what it built, and recommended skills.
- Observability
- Workers and background jobs