What is loop engineering?
For two years we prompted coding agents one task at a time. That's changing. Loop engineering is replacing yourself as the person who prompts the agent — you design the system that does it instead.
"You shouldn't be prompting coding agents anymore. You should be designing loops that prompt your agents." — Peter Steinberger · "My job is to write loops." — Boris Cherny (Claude Code)
A loop is a recursive goal
Define a purpose and a stop condition, then run a repeating five-phase cycle until it's met:
- 1Discover
Inspect the current state and find what needs doing.
- 2Plan
Decide the next bounded action.
- 3Execute
Apply one bounded change.
- 4Verify
Check the work — ideally a separate agent so it isn't self-grading.
- 5Escalate
Surface to a human anything risky or stuck.
The two pieces that separate a real loop from a while true are verify (a loop that
can't check itself just makes mistakes faster) and memory (the model forgets everything between
runs, so state must live outside the conversation — a markdown file, an issue tracker, git).
The complexity ladder
cronloops organises designs along a 0–5 ladder — it doubles as a learning path.
| Level | What it is | |
|---|---|---|
| L0 | One-shot | Fires once, then deletes itself. A reminder or single deferred action. |
| L1 | Poller | Re-runs a single prompt on an interval to watch one thing. |
| L2 | Verify-until-done | Self-paces and keeps going until a condition is provably true, then stops. |
| L3 | Maintenance | Standing loop that continues unfinished work and runs cleanup passes. |
| L4 | Triage fan-out | Discovers many items, isolates each, fixes, verifies with a second agent, surfaces results. |
| L5 | Orchestrated | Multiple chained loops / multi-agent reactive system. |
What a loop is built from
Five building blocks, plus one place to remember:
- Automation. The cadence/trigger that starts each cycle.
- Worktrees. Isolated working copies so parallel work doesn't collide.
- Skills. Codified, reusable procedures the loop invokes.
- Sub-agents. Separate agents, e.g. one to do work and one to verify it.
- Connectors. Integrations to external systems (issue trackers, chat, APIs).
- Memory. External state that persists between runs.
- Hooks. Shell commands fired at lifecycle points.
- Memory. External state that survives between runs.
Build the loop. Stay the engineer.
A loop running unattended is also a loop making mistakes unattended. The leverage moved from prompt quality to loop-design quality — but verification stays human. Every design here treats guardrails and verification as first-class.