Anthropic pays their engineers $80,000 a month. Those engineers now merge 8x more code per day than they did a year ago. Not because the model got smarter. Because they stopped prompting Claude and started building systems that prompt it for them.

Brian Cherny, head of Claude Code at Anthropic: "I don't prompt Claude anymore. I have loops running that prompt Claude and figure out what to do. My job is to write loops."
Most developers read that and have no idea what it means in practice. By the end of this article you will - and you'll have everything you need to build your first one this weekend.
What a loop actually is
A prompt is a single instruction. A loop is a goal the AI keeps working toward until it gets there.
The difference is who does the driving. With a prompt you push Claude through every step manually. With a loop you define the goal once and the system runs the full cycle on its own - finding the work, executing it, checking the result and deciding what comes next. All without you in the chair.
Prompt | you type, Claude answers, you type again
Loop | system finds work, Claude executes,
| system checks result, repeats until doneEvery real loop has five stages:
Discover | find what needs doing
Plan | decide how to do it
Execute | do the work
Verify | check against the goal
Iterate | not done? feed result back in and go againThree of these do all the real work.
Verify is the heart. Without a real check on the result you don't have a loop - you have the agent agreeing with itself on repeat. The check has to be objective. A test that passes or fails. A build that compiles or doesn't. A linter that returns zero or non-zero. Not a second agent asked to "review." Two optimists agreeing is not verification.
State is what makes the loop learn. Each pass the AI has to remember what it already tried or it repeats the same mistake forever. A real loop keeps a record outside the conversation - what is done, what failed, what is next. The agent forgets between sessions. The file doesn't.
A stop condition is what keeps it sane. A loop with no exit runs until it succeeds, breaks or drains your budget. Every serious loop has two ways to stop - success, and a hard limit. Without this you've built a machine that bills you in silence.
The 4-condition test before you build anything
A loop earns its cost only when all four of these are true. Miss one and keep it as a manual prompt.
Condition 1 | the task repeats at least weekly
| less than weekly - setup cost never pays back
Condition 2 | something can automatically reject bad output
| a test, build, linter, type check
| no automated gate - you're back reviewing every diff
Condition 3 | the agent can do the work end to end
| not hand half of it back to you mid-task
Condition 4 | done is objective, not a judgment call
| if quality is a matter of taste, a human still winsGood first loops:
CI failure triage | nightly, classify failures, draft fixes
Dependency bumps | weekly, scan updates, open PRs
Lint-and-fix passes | on every PR, apply style fixes automatically
Issue-to-PR drafts | on codebases with strong test coverageBad first loops - keep a human in the chair:
Architecture rewrites | judgment call, loop will drift
Auth or payments code | irreversible mistakes too expensive
Production deploys | needs human approval gate
Vague product work | done is not objective
Generated by Thread Navigator
Press ⌘ + S to quick-export
