What is loop engineering?
Loop engineering is the practice of designing a system that prompts your AI agent for you: it discovers work, hands tasks to the agent, verifies the result, persists state, and decides what happens next — on a schedule or until a goal is met.
The term took off in June 2026, when OpenClaw creator Peter Steinberger posted that you shouldn't be prompting coding agents anymore — you should be designing loops that prompt your agents. Boris Cherny, creator of Claude Code, had said the same thing on stage days earlier: he doesn't prompt Claude anymore; his job is to write loops.
The five phases of a loop
Every production loop cycles through the same five phases: discover (where does work come from — a queue, a diff, an API), act (the agent call), verify (an automated check that gates the cycle: tests, lint, rank data), persist (state that survives the run, often a plain markdown file), and decide (continue, exit, or escalate to a human).
Verify is the hard part
An open loop with no feedback is a machine for generating confident mistakes. The verify step is where loop engineering earns its name: something in the loop has to be able to say no — a test suite, a type checker, a second model judging the goal, a real-world metric. Design the verify step first; the rest of the loop falls out of it.
Loops vs prompts vs harnesses
Prompt engineering shapes a single turn. Context engineering shapes what the model sees. Harness engineering shapes the environment an agent runs in. Loop engineering sits above all three: it decides when the agent runs at all, what counts as done, and what happens between runs. The vocabulary keeps shifting; the layering is the durable idea.
Where to start
Pick a task with a built-in verifier — failing tests are the classic. Write the goal as an acceptance criterion, add an exit condition (always add an exit condition), and run it on a schedule. Our template library has runnable seven-field specs for coding, content/SEO, data and ops loops, each with measured token cost per cycle.