WTF Is a Loop? Part 2: The 15 Loops People Are Actually Running
- Source
- x.com
- Author
- Matt Van HornTop Viber
- Date

Context
Before delegating repeated work to an , decide what evidence should end the repetition. Matt Van Horn's loop catalog includes a completion-contract pattern: specify the required result and the evidence for each requirement before work starts. It also describes bounded cycles that save progress and stop after a limited number of attempts.
These patterns address different failure modes. A completion contract challenges an unsupported claim that the work is finished; an attempt limit ends an unsuccessful run even when the desired result remains unmet. The useful distinction is between evidence of success and a boundary on continued effort. Both need to be specified when designing the repeated task.
- What makes a goal safe to walk away from is a separate fast model checking after every turn whether the finish condition is actually true. The loop stops on a verified condition, not on the agent's own say-so.
- The bounded pattern that fixes runaway loops: plan, generate, verify, fix, repeat — with everything written to files and a hard cap of five iterations. You read only the final version, and the cap is what makes leaving it unattended safe.
- The verifier is the part everyone skips. Pair a builder that writes code with a separate checker that runs tests, types and lint and reports exactly what broke, because a single-pass agent ships its own bugs.
- A naming trap that breaks people's setups: there is no /routine command in either tool. Scheduled work that runs while your laptop is closed is /schedule in Claude Code and Automations in the Codex app.
- AI agent — An AI system that doesn't just answer once but works toward a goal in a loop — taking actions, reading the results, and deciding what to do next.
“Goal is keep working until the outcome is achieved. Loop is keep repeating a task while I am here. Routine is keep working while I am gone.”
inyourhandmedia
“there is no `/routine` command in either tool”
“The verifier is the part everyone skips. Without it you are just trusting the agent.”
Checking sign-in…
Loading comments…



