WTF Is a Loop? Part 2: The 15 Loops People Are Actually Running
Source
Matt Van Horn
Author
Matt Van HornTop Viber
Date
Key takeaways · AI-distilled
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 AI agentAn 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.Full definition →'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.
Terms in this piece · Glossary
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.
Why it matters
Matt Van Horn's breakdown of the 15 agent loops people actually run day to day, each with a copyable command. The practical sequel to his viral explainer — skip the theory and steal a working loop.
Key quotes
“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.”