Loop patterns
The recurring shapes that agentic loops take. Each is a different answer to "what triggers the next iteration, and what ends it?"
Every loop answers two questions: what triggers the next iteration and what ends it. The patterns below are the common answers. They mix freely: a Ralph loop can contain a maker/checker step, a heartbeat can start a goal loop, and a graph is mostly loops wired together.
| Pattern | Next iteration triggered by | Ends when | Typical use |
|---|---|---|---|
| Ralph loop | The previous iteration ending | Completion promise, iteration cap, or never | Grinding through a backlog or spec |
| Maker/checker | The checker rejecting the work | The checker approves | Anything where quality matters |
| Metric loop | A finished experiment | Budget exhausted; best result kept | Optimisation with a clear number |
| Ambient loop | A timer or an event | Never; it's a standing process | Babysitting, monitoring, inboxes |
| Graphs and teams | An orchestrator, or another node | The orchestrator decides | Large or parallel projects |
The Ralph loop
The dumbest smart way to run a coding agent.
Maker/checker
Separate the worker from the grader.
Metric loops
Karpathy's autoresearch and the power of a single number.
Ambient loops
Heartbeats, /loop, routines: agents that wake themselves up.
Graphs and teams
When one loop isn't enough: planners, evaluators, teams, kanban.
Know a pattern that's missing?
Patterns emerge from practice. If you've been running a shape that isn't here, tell us about it in a field report.