✨ Visual Editor

close

Thread Truncated

Only the first 20 tweets are shown to ensure high-quality rendering and prevent image size issues.

palette Canvas & Background

Gradient:arrow_forward
Text Color:
135°

style Card Style

40px
16px

text_fields Typography

16px
Cortex
@0xCortexl
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.
Thread image
Cortex
@0xCortexl
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."
Cortex
@0xCortexl
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.
Cortex
@0xCortexl
What a loop actually is
Cortex
@0xCortexl
A prompt is a single instruction. A loop is a goal the AI keeps working toward until it gets there.
Cortex
@0xCortexl
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.
Cortex
@0xCortexl
Prompt      |  you type, Claude answers, you type again
Loop | system finds work, Claude executes,
| system checks result, repeats until done
Cortex
@0xCortexl
Every real loop has five stages:
Cortex
@0xCortexl
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 again
Cortex
@0xCortexl
Three of these do all the real work.
Cortex
@0xCortexl
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.
Cortex
@0xCortexl
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.
Cortex
@0xCortexl
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.
Cortex
@0xCortexl
The 4-condition test before you build anything
Cortex
@0xCortexl
A loop earns its cost only when all four of these are true. Miss one and keep it as a manual prompt.
Cortex
@0xCortexl
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 wins
Cortex
@0xCortexl
Good first loops:
Cortex
@0xCortexl
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 coverage
Cortex
@0xCortexl
Bad first loops - keep a human in the chair:
Cortex
@0xCortexl
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
100%
view_carousel Carousel Studio NEW
Press + S to quick-export