What is Loop Engineering, the thing everyone's suddenly talking about

A close look at Anthropic engineers' "loop engineering" methodology: instead of manually prompting AI line by line, you design a system that runs itself
By Loop Engineering (论文 PDF)06-29 · 12 min read⚑ Research paper
🎧 Listen to the podcast0:00 / --:--
0:00 / --:--
Deep Dive · XiaoHu Explains
Quick Take
  • Loop Engineering was independently discovered and named by Addy Osmani, Boris Cherny, and Peter Steinberger in the same week of June 2026: instead of manually prompting AI, you design a system that automatically prompts AI — you shift from "operating AI" to "designing the system that drives AI"
  • A loop has five steps: discovery, handoff, independent verification, persistence, and scheduling. Skip any one of the five and you get a corresponding named failure mode (the nodding loop, the amnesiac loop, the manual loop, the blind loop, the tangled loop)
  • The hardest step, and the one most often skipped, is verification: letting AI grade its own output makes it praise itself, so you need a separate agent playing the skeptic, defaulting to "assume the code is broken," and actually clicking through the page and taking screenshots — not just reading code
  • Stripe's Minions pipeline merges over 1,300 machine-written PRs every week; the reliability comes from deterministic constraints (linters run and forced, agents can't route around them), not a bigger model
  • A loop quietly racks up four kinds of debt: verification debt, understanding rot, cognitive surrender, and token-bill blowups. The four reinforce each other and eventually erupt together — the gatekeeper is always human judgment
1Origin · Naming

Three people stumbled onto the same thing in one week

In the same week of June 2026, Google Chrome engineer Addy Osmani, Anthropic's Claude Code lead Boris Cherny, and OpenClaw author Peter Steinberger — none of them coordinating — landed on the same realization: they'd all stopped manually prompting AI and started designing "systems that automatically prompt AI."

Loop Engineering names an identity shift: you go from "the person sitting at the keyboard directing AI one line at a time" to "the person designing a system that gives AI its own assignments." The whole weight of that sentence sits on "replacing yourself."
⚡
Why it's worth your attention: Steinberger's post — "you should be designing loops, not prompting agents" — hit 8 million+ views; Cherny put it as "I write loops now, my job is writing loops"; on June 7, Osmani named it Loop Engineering and wrote it up as an article. All three point at the same shift: what you design has moved from being a single behavior of the agent to being the entire system that drives the agent. And Stripe is already running this pattern at scale, merging over 1,300 machine-written PRs every week.
8,000,000+
Views on Steinberger's "you should be designing loops, not prompting agents" post
6 / 7
The date Osmani named it Loop Engineering and wrote it up, syncing to Substack the next day

Why this exact week

Three people reached for the same word in the same week without comparing notes — that's not coincidence, it's the surrounding tools quietly crossing a threshold. Three conditions matured at once: coding agents became reliable enough to finish a non-trivial task unattended; scheduling primitives just showed up in mainstream tools; and the cost of a single run dropped low enough that running it over and over stopped feeling wasteful. Once every part existed, "combine them" became obvious to everyone at the same time.

The name always lags the practice by months: people were already writing loops long before anyone called it Loop Engineering — the same way teams were already pairing a code-writing agent with a code-reviewing agent long before "generator/evaluator separation" had a name. Worth remembering: the next new term won't come from a model release, it'll come from the moment some capability gets cheap enough that a combination nobody would have dared try before becomes routine.

2Where It Sits

It sits at the top of these four layers

These "X engineering" terms aren't replacing each other — they stack, each layer managing something one size bigger than the one below: from a single sentence, to a context window, to a single run, to a self-sustaining loop. Click into each layer to see what it manages and how big the blast radius is when it fails.

Loop · Loop Engineeringthe top layer
Manages: scheduling on top of the harness, making it run itself over and over. Core question: how do you get it to run unattended, repeatedly. It adds three verbs on top of the layer below: scheduled runs (it wakes itself up on time, no button to press), split sub-agents (one drafts the change, another exists purely to find fault), and feeding its own output back into the next round (yesterday's findings get written to a file, read back in this morning, and built on). Blast radius when it fails: an error gets written into the state file, read back the next day as established fact, and built on — it can propagate for many rounds before anyone catches it.
Harness · single-run kitarm one run
Manages: fully equipping a single agent run — which tools it can use, which operations are allowed, how to recover from errors, what "done" looks like. Core question: what does this one run need to bring with it. It arms a single run, but doesn't make that run repeat on its own. Blast radius when it fails: the agent misreads something and edits a file based on it, but the run ends, the diff is visible, and a human reviews it before it ships.
Context · context engineeringthe window now
Manages: what's in the window right now — what to retrieve, how to summarize, what stale information to clear out. Core question: what do you show the model so it can actually solve this. A window stuffed with noise wastes even the best-written prompt. Blast radius when it fails: a confidently wrong answer — spot it and clear the context, done.
Prompt · prompt engineeringthe words you write
Manages: the sentence you write for the model — wording, examples, persona, tone. Core question: what should you tell the model. Its boundary is a single conversation. Its trouble is that it assumes someone is always sitting there to feed it the next prompt. Blast radius when it fails: caught on the spot within one conversation — just rewrite the prompt.

Take the same bug — an agent misreading some function's return value — and run it through all four layers: the higher up you go, the later it's caught and the more it costs. At the loop layer, that misreading gets written into a state file, read back as fact the next day, and built on layer after layer — by the time anyone looks, that wrong assumption has become a load-bearing wall.

This is the one intuition worth holding onto from loop engineering: the cost of an error equals how many rounds it survives before someone catches it, and a loop, by construction, is a machine for maximizing the number of rounds. Everything that follows — evaluators, human checkpoints, budget caps — exists for exactly one purpose: to shorten the distance between "the mistake happens" and "the mistake is caught."

3Five Steps

One cycle, five steps — skip any one and it breaks in a predictable way

Don't misread "loop" as idling. Every round does something concrete: find work worth doing, hand it off, verify it's correct, save the state, decide what's next. Skip any of the five steps, and the loop either won't turn, or it'll spin in place — and it breaks in a specific, named way.

Discover Handoff Verify can say no Persist Schedule loop a system that runs itself
Five steps arranged clockwise in a circle — scheduling feeds this round's leftover work into tomorrow's round · verification is the only step in the whole circle that can say "no"

Let's use Osmani's own example — the "morning triage loop" he built for himself — to walk through what each step does, and which named failure mode you get if you skip it.

1
DiscoveryDiscovery
The triage skill reads yesterday's failed CI runs, still-open issues, and recently merged commits, and figures out on its own what this round should tackle. The key is letting the agent find the work itself, rather than being handed a list. This step sets the ceiling for the whole loop's quality — if what it pulls up isn't worth doing, the other four steps, however well executed, are wasted.
Skip it → blind loop: you're still manually assigning work every morning ("fix these three bugs"), so you've automated the "doing" but not the "finding" — and the "finding" is often the more expensive half
2
HandoffHandoff
Passing work from the scheduling system to the agent that does it. For every discovery worth acting on, spin up an independent git worktree — multiple agents each edit code in their own directory, without colliding on files. The cleaner each piece of work is cut, the easier verification and merging get later.
Skip it → tangled loop: several agents run in parallel but all edit the same directory, their changes collide, and the merge turns into a mess nobody can untangle. It looks fine with a single agent — the problem only shows up the morning five agents run at once
3
VerificationVerification
⊘ the only step in the whole circle that can say "no"
The easiest step to cut corners on — and the one you can least afford to. Have one sub-agent draft the fix, then have a second sub-agent, with different instructions (sometimes even a different model), review it. The agent that wrote the code grades its own homework too leniently; the fault-finder can catch things the first agent talked itself into believing were fine. A loop without real checking is just an agent nodding at itself.
Skip it → nodding loop: the most common failure. Every round approves itself, stacking up plausible-looking errors at machine speed. Run for hundreds of rounds without a single "no" — that's a statistical impossibility for any real body of work, and is itself proof there's no real checking going on
4
PersistencePersistence
Land the results somewhere that outlives this one conversation: open a PR or update a ticket through a connector, drop unsolved items in an inbox, keep a state file tracking progress. A loop's memory can't live only in the context window — something written to markdown or a board doesn't get forgotten.
Skip it → amnesiac loop: good work gets found and done, then forgotten, because the results only ever lived in a context window that got cleared. The next day, the same work gets rediscovered — sometimes redone, clashing with the first round's output. Every morning starts from the same square one, with nothing accumulating
5
SchedulingScheduling
This is what turns "one round" into "a loop." Triage runs automatically every morning; the state file lets unfinished discoveries carry over to the next day, which picks up where it left off on its own. In Osmani's words: automation is what makes a loop an actual loop, rather than just a run you happened to execute once.
Skip it → manual loop: the other four steps are fine, it's just never automated — that's not a loop, it's a script you run by hand and then forget to rerun. It looks stunning the day you demo it, then quietly stops the moment your attention shifts elsewhere. The last time it ran is the day it got demoed

These five steps aren't an optional checklist — they're an interdependent whole. Disciplined teams install all five; rushed teams install only the first two (discovery + handoff), because those two produce visible output, while the last three produce "safety" — and safety is the easiest thing to skip.

4Six Parts

Building a loop means assembling six parts

The five steps describe "what happens in one round"; the six parts describe "what you need in hand to make it turn." They map one to one: discovery runs on skills, handoff runs on worktrees, verification runs on sub-agents, persistence runs on memory, scheduling runs on automations. Click into each card to see what problem it solves.

① Automations Scheduling
Hooks onto a schedule or trigger, making the loop move on its own. Without it, what you have in hand is a single run, not a loop. Scheduling comes in two flavors: local (the machine has to stay on) and cloud (keeps running even when it's off). What gets triggered should be a named skill, not a giant blob of instructions glued into a cron job.
② Worktrees Handoff
A mechanism built into git — multiple mutually isolated working directories within one repo. Its value scales with parallelism: two agents writing to the same file at the same time is just as painful as two engineers committing to the same line. It turns parallel work from "runs, but messy" into "runs, and stays clean."
③ Skills / SKILL.md Discovery
Bakes project knowledge into a single file so the agent doesn't have to re-derive context every round. Osmani calls what this saves intent debt: the cumulative cost of re-explaining "what this project is, what the rules are, where the pitfalls are" every time you open a new session. A skill is reusable and maintainable; a wall of prompt text is not.
④ Connectors Persistence / Discovery
Built on MCP (Model Context Protocol — the standard interface that lets AI call external tools), connectors wire the loop up to the outside world: issue trackers, databases, staging APIs, Slack. A loop that can only see the local filesystem is a very small loop. A connector built for one tool can often be dropped into another tool as-is.
⑤ Sub-agents — split generator from evaluator Verification
Splits the writer and the judge into two separate agents. When one agent is both player and referee, the referee plays favorites. Counterintuitively, it's much easier to tune an independent judge to be picky than to tune the author to be self-critical — so the loop would rather feed one extra agent than let a single agent grade its own homework.
⑥ Memory / state file Persistence
State that lives outside any single conversation — a markdown file, or a board. Empty the context window and the agent remembers nothing; for today to connect to yesterday, memory has to be written to disk. The agent forgets; the repo doesn't. Memory isn't context: context is what's visible this round and vanishes on refresh; memory persists across rounds and across days.
what is a worktree

Like several cooks prepping at the same time, each given their own cutting board — everyone cuts their own thing without bumping hands. Share one cutting board and you collide. A worktree is giving each parallel agent its own cutting board.

Get all six parts in place and the loop has a skeleton: automation makes it move, worktrees keep it from fighting itself, skills keep it from repeating work, connectors let it see outside, sub-agents let it self-correct, memory lets it remember. But building the skeleton is just the start — the same six parts, in two different people's hands, can produce completely opposite outcomes, which is the topic of the last section.

5Core · Verification

The hardest step: why AI can't grade its own homework

The hardest part of a loop was never getting the agent to run — it's putting something inside the loop that can say "no," and the agent that wrote the code is precisely the one least likely to say it.

Core Innovation · generator / evaluator separation

① Why it inevitably praises itself. Have an agent grade the thing it just produced, and it tends to praise itself confidently, even when a human can spot mediocre quality at a glance — an observation Anthropic engineer Prithvi Rajasekaran made while building long-running applications. This isn't an intelligence problem: by the time the code is written, the context is already stuffed with reasons for "why I wrote it this way," so when the agent looks at its own output, it doesn't see the result — it sees the whole chain of reasoning that talked it into getting here. Inside a loop, this flaw gets amplified: every "is this good enough" gets decided by the very agent that just finished writing it, nodding at itself round after round, drifting further from actual quality the longer it runs.

② The fix isn't tuning the author, it's swapping the judge. Tuning the generator to be more self-critical is a dead end — you can't ask an author to step outside their own perspective. What works is bringing in an independent agent that looks at the code from zero, carrying a completely different set of instructions, untouched by any of the original self-justification. Tuning an independent skeptic is far easier than turning an author self-critical. The inspiration comes from GANs (Generative Adversarial Networks): one network creates, the other finds fault — translated to code, one writes, the other reviews.

③ Reading code isn't enough — you have to click through it. If the evaluator only reads code, it's judging "does this look right," not "does this actually work." For frontend tasks, Rajasekaran hooked the evaluator up to Playwright MCP so it acts like actual QA: opening the page, clicking buttons, taking screenshots, inspecting the DOM. The basis for judgment shifts from "this JSX looks fine" to "I clicked the button, the page navigated, here's the screenshot." He also swaps the underlying model while he's at it — the same model with a different set of instructions often still carries the same blind spots. A calibration the community often uses: have the evaluator default to assuming the code is broken until proven otherwise — the default posture should be suspicion, not trust.

④ Maker-checker: who swings the final hammer. Claude Code turns this structure into a primitive with /goal: give it a condition, and it runs until that condition is met. The key part is that after every round, whether the condition is met gets judged by a fresh, small, fast model — not the model that's currently doing the work. This is the maker-checker principle banks have used for decades.

generator / evaluator separation

The person who enters a large wire transfer at a bank and the person who reviews that transfer must be two different people — a rule the banking industry has followed for decades, called maker-checker. Carry it into a loop: the agent that writes the code and the model that decides "pass or fail" must be two separate entities, and the latter starts from zero, defaulting to assuming you got it wrong.

Generator · writes the code
Its context is full of reasons for "why I wrote it this way" — it sees the chain that talked itself into it
↓  draft
Evaluator · independent agent
Different model · defaults to assuming the code is broken · uses Playwright MCP to actually click through the page, screenshot, inspect the DOM — judges behavior, not intent
↓
REJECT + itemized reasons ↩
send back to generator to rewrite
PASS ✓
moves to the next gate
↓
Fresh small model judges the stop condition
Not the model that just did the work · that final hammer-swing is maker-checker

Codified as config, the evaluator looks like this — every line here is executing one of the four principles above: swap the role, default to broken, actually verify hands-on, give itemized reasons.

.claude/agents/reviewer.md, adversarial review agent
ROLE: Adversarial code reviewer.
ASSUME: this code is BROKEN until proven otherwise.
       # Default to assuming the code is broken until proven otherwise
DO NOT praise. Find what fails.  # No praise allowed — just find what breaks

CHECK, in order:        # Check in this order
  1. Does it run? (execute, don't read)   # Does it run: execute it, don't just read it
  2. Tests: run them, paste real output.  # Run the tests, paste the real output
  3. Edge cases the author skipped.       # Edge cases the author skipped
  4. Does behavior match the ticket?      # Does behavior match the ticket

USE Playwright MCP: open the page, click,
    screenshot, inspect the DOM. Judge behavior, not intent.

VERDICT: PASS only if every check holds.
         Otherwise REJECT + list each reason.
         # PASS only if every check passes, otherwise REJECT with itemized reasons
stop condition, judged by a fresh small model
/goal all tests in test/auth pass and the lint step is clean
# Runs until "test/auth all pass AND lint is clean"
# Note: /goal runs until the condition is met — different from /loop (reruns at a fixed interval)

A loop's floor is set by its evaluator. The generator's caliber determines what the loop can produce; the evaluator's caliber determines what it won't produce. Structurally splitting generation from judgment, tuning the evaluator to be a skeptic, having it actually verify hands-on, and handing the final hammer to a fresh model — these four steps together are the whole recipe for giving a loop the ability to say "no."

6Case Studies

One person's morning, and Stripe's 1,300 PRs a week

Two real loops, wildly different in scale, but identical in skeleton: a trigger kicks things off, a set of constraints keeps it on the rails, and a human checkpoint sits at the end. "It runs while you sleep" was never about the model being stronger — it's about how solid this skeleton is.

Case A · One person, one machine

Osmani's morning triage

  • An automation kicks itself off every morning
  • The triage skill reads yesterday's failed CI, open issues, recent commits
  • It calls a skill, not a blob of instructions glued into a schedule
  • Each finding gets its own worktree: one sub-agent drafts, another reviews against the skill and the tests
  • A connector automatically opens PRs and updates tickets
  • Anything unresolved goes to an inbox and waits for a human; the state file lets tomorrow pick up from yesterday
Case B · Enterprise scale

Stripe's Minions

  • Merges 1,300+ PRs every week, none of it hand-written
  • The trigger is light: an @ mention to the bot in Slack, or an emoji reaction
  • The real work happens before the model even wakes up: a deterministic orchestrator assembles the context first
  • The sandbox is a Devbox on EC2 — "cattle, not pets" — disposable and swappable, thousands of agents run at once without colliding
  • Those 1,300 PRs are still reviewed by humans — the human hasn't left, just moved from the desk that writes code to the desk that reviews it

The most counterintuitive part of Stripe's setup: Minions isn't built on a stronger model — it's a fork of the open-source tool Goose. Its core claim is that reliability comes from the quality of the constraints, not the size of the model. Architecturally, deterministic gates (blue) and creative LLM steps (green) interlock in sequence — anything that can be solved with deterministic logic never gets handed to the probabilistic model. Where that line gets drawn decides whether the loop is reliable. (This case was disclosed by Stripe engineer Steve Kaliski on the How I AI podcast.)

Deterministic step (not an LLM, rules hard-coded)LLM step (creative)
Human trigger
@bot in Slack, or an emoji reaction
↓
Deterministic orchestrator
Scans links, pulls Jira, uses Sourcegraph + MCP to locate relevant code — doesn't let the LLM go hunting for its own context
↓
LLM
Material assembled, writes the code
↓
Hard-coded gate
Linter forced to run, agent can't route around it
↓
LLM
Fixes the lint
↓
Hard-coded step
git commit
↓
Human review
1,300 PRs a week, still reviewed by humans

What "runs while you sleep" actually depends on

Both local /loop and desktop scheduled tasks need the machine to stay on — turn it off and they stop. To run while the machine is off, the right answer is Cloud Routines or GitHub Actions' scheduled triggers. The three approaches each cover a different slice:

Scheduling methodRuns whereMachine must stay on?Session must stay open?Shortest intervalCan read local files?
Local /loopLocal machineYesYes1 minuteYes
Desktop scheduled taskLocal machineYesNo1 minuteYes
Cloud Routines / CICloudNoNo1 hourNo

The point isn't which one's better — it's that these are two different capabilities: local scheduling means "run more rounds while I'm around," cloud scheduling means "keep running while I'm gone." Treating local reruns as the whole of "unattended" is the most common misunderstanding — close the laptop lid and the loop you thought was autonomous quietly stops. Mature loops tend to use both: local handles the tight, up-close checks, cloud handles the overnight sweep.

Worth noting: the commands are Claude Code's, but the capability isn't exclusive to it

The commands in this piece are written in Claude Code's syntax, but the capability isn't unique to it. Codex offers the same six organs under different names: scheduling, run-until-condition-met, parallel isolation, sub-agents, external connectors, explicit skill invocation — and a connector built for one tool often drops into another as-is. Whichever tool chain you switch to, the question to ask is "are all six present," not "whose command is this."

7Hands-On

Step by step: build your first loop

Stripe's pipeline is the destination, not the starting point. Your first loop should be small enough to barely look like a system: something that checks on a few things whenever its time comes around. The five steps below can be copied directly, each with commands and config, adding up to a minimal but complete loop that has all six parts.

v2.1.72
The Claude Code version that first supports /loop
v2.1.139
The version that first supports /goal (runs until a condition is met)

① Start a /loop

Available since v2.1.72, it reruns the same task at an interval. Scoped to the session, a repeating task expires after 7 days, and it runs on your local machine — stop when the machine shuts down. Three ways to use it:

/loop, three usages
/loop 5m check the deploy   # Fixed: rerun every 5 minutes
/loop check the deploy      # Agent sets its own pace
/loop                       # Reads the task from .claude/loop.md

② Use a skill for automatic discovery: triage first

Just rerunning one line doesn't make it a loop. Give it a prompt: check three things every morning, and list what's worth acting on. "Scheduled + auto-discovery" is loop-engineering 101. The discovery logic should live in a skill, not in the schedule — instructions baked into a cron job rot once nobody updates them, while a SKILL.md file can be maintained and reused.

.claude/skills/morning-triage/SKILL.md
NAME: morning-triage
WHEN: invoked each morning by automation.
      # Invoked each morning by automation
READ:
  - CI runs that failed since yesterday   # CI runs that failed since yesterday
  - issues opened in the last 24h         # Issues opened in the last 24 hours
  - commits merged since the last run      # Commits merged since the last run
JUDGE: for each item, is it worth acting on?
       Skip noise. Keep only actionable findings.
       # For each item, judge: actionable now, or just noise? Keep only actionable findings
OUTPUT: write findings + status to
        ./state/triage.md (one row per finding).
        # Write to ./state/triage.md, one row per finding

③ Add a state file

Don't leave the results sitting in the chat window. Write every finding, and how far along it is, into a markdown file (or a Linear board). The agent forgets; the repo doesn't.

./state/triage.md, this loop's memory
| finding         | source    | status   |
|-----------------|-----------|----------|
| auth test flaky | CI #4821  | fixing   |
| null deref      | issue 92  | PR open  |
| stale dep       | commit a3 | inbox    |

④ Add a /goal evaluator

The most critical step, and the easiest one to skip. /goal (since v2.1.139) runs until a condition is met, with a different model judging whether that condition has been reached. Note it's different from /loop: /loop reruns at a fixed interval, /goal runs until it hits the target, with the stop condition judged by a fresh small model. Pair it with the reviewer.md from the previous section (defaults to assuming the code is broken, verifies hands-on, gives itemized reasons) so it finds fault every round.

/goal, give it an objectively decidable stop condition
/goal all tests in test/auth pass and the lint step is clean
# Runs until "test/auth all pass AND lint is clean," judged by a fresh small model

⑤ Add --worktree for parallel isolation

Use --worktree (or -w) to give each background agent its own worktree — one worktree per task, so multiple agents editing code at once don't collide on files.

One independent worktree per finding
claude --worktree fix/auth-test  "draft the fix"
claude --worktree fix/null-deref "draft the fix"

The six-part checklist for your first loop

Check them off and see if you're fully equipped. The first two determine whether it runs at all; the last four determine whether anyone's watching once it's running and something goes wrong. The most common beginner mistake is installing only the first two, ending up with a loop nobody watches, nobody can stop, and that's still nodding at itself.

Discovery sourcedetermines if it runs
What does it read when its time comes? CI / issues / commits / inbox
State filedetermines if it runs
Which file on disk stores memory across rounds?
Independent verificationwatches for trouble
Is there an independent agent that can say "no"?
Worktree isolationwatches for trouble
Does every parallel agent get its own directory?
Token capwatches for trouble
Is there a per-run budget and a daily cap set? Who stops it?
Human review checkpointwatches for trouble
Which step pauses and waits for you, instead of running straight through?

A minimal loop with all six parts

Turn the checklist into code, and you get something small enough to read in one breath — yet it carries every organ a real loop needs, just scaled down. The six comments map one to one onto the six parts.

.github/workflows/triage.yml, a complete minimal loop
# 1. Scheduling — a real trigger
on:
  schedule:
    - cron: '0 6 * * *'   # Every day at 06:00, runs in the cloud

# 2. Discovery — calls a skill, not a blob of instructions
run: claude --skill morning-triage

# 3. Persistence — state written to disk
#    the skill writes ./state/triage.md and commits it back to the repo

# 4. Handoff + Verification — one worktree per finding, runs until target
for finding in $(parse ./state/triage.md); do
  claude --worktree "fix/$finding" \
    --goal "tests pass and lint is clean" \
    "draft a fix for $finding"
done

# 5. Verification — stop judged by a fresh model after every round,
#    plus a reviewer agent whose whole job is finding fault

# 6. Human review — the door left standing open
#    PRs only open, never auto-merge; anything uncertain goes to ./inbox/

Get all six in place and even a tiny loop is a real loop; miss any one and it's one of the five failure modes from the earlier section, just wearing a disguise. Your first loop should stay small — but the "can-say-no" check and the human review checkpoint must be fully installed.

8The Cost

A loop quietly runs up four separate tabs

A loop that can run itself is, at the same time, a loop that can err by itself. The more smoothly it runs, the more quietly it goes wrong. Four kinds of cost accumulate silently while it's running, and none of them ever sound an alarm in the moment.

Verification Debt Understanding Rot Cognitive Surrender Token Blowup reinforce each other erupt together
Unverified output corrodes understanding, lagging understanding invites surrender, surrender lets the loop run longer and spend more, producing yet more unverified output — back around to verification debt

Trace how one triggers the next through a concrete scenario: a loop opens 20 PRs overnight, all tests green, looks like a big win on the surface. But 3 of them hide small bugs the tests don't cover.

No independent evaluator, so those 3 flawed ones get merged too → this is verification debt
↓
You merge all 20 without reading them; your mental map of the code has fallen 20 changes behind → this is understanding rot
↓
The loop runs so smoothly that you just stop looking the next morning → this is cognitive surrender
↓
It spawned sub-agents and retried repeatedly all night, and the bill comes in at three times what you estimated → this is token blowup

Those 3 buried bugs are now sitting in a codebase you no longer fully understand, "watched over" by someone who's already stopped looking — until one of them surfaces in production. The four costs aren't a list of independent risks; they're four faces of the same failure, feeding each other, all coming due at once.

Guarding against each takes a different move:

Verification debt
Set up an independent evaluator that isn't the same agent that did the work, and let it find fault in the gap between "it runs" and "it's correct"
Understanding rot
Sample a few entries every day and force yourself to explain "what changed and why" — if you can't explain it, your mental map has fallen behind
Cognitive surrender
Keep at least one checkpoint that requires a human to press a button — the loop can execute, but it can't decide; you need to keep at least the ability to say "this is wrong"
Token blowup
Before the first unattended run, set a per-run budget + daily cap + max retry count — don't let one stuck bug burn through an entire night's quota

All four share one trait: while the loop is running, they're completely silent. What's most fascinating about loop engineering is that it lets one person do the work of a team; what's most dangerous is exactly the same thing — a team would argue with itself, but one person running a pile of loops can easily end up in an echo chamber where nobody argues back. The gatekeeper is, and always must be, human judgment.

9Closing

You're still the engineer, not just the person who presses go

The same loop, built by two different people, can end up in opposite places — and the difference isn't in the loop itself.

One person uses a loop to move faster on things they already understand deeply: they read the code, they're confident in the direction, and the loop amplifies the judgment they already had. Another person uses the exact same loop so they never have to understand it in the first place. Six months later, the first person has gotten stronger, and the second has become the gatekeeper of a machine they can no longer read.

A loop isn't the kind of tool whose quality is fixed by the tool itself — it's strong enough to faithfully amplify whatever you bring into it: bring understanding, and it amplifies understanding; bring laziness, and it amplifies laziness. It's a faithful multiplication sign, and what it multiplies is the person who built it.

A loop makes generation almost free: code, plans, PRs, fixes, nearly for nothing. What stays scarce is judgment: knowing which plan is right, which line should stop you, which output runs fine but is wrong at the root. A loop can generate a hundred options, but it can't actually choose between them — or rather, it chooses by "looks plausible," not "is actually correct," and that gap is exactly why the engineer still exists. So loop engineering hasn't devalued judgment — it's stripped away everything that doesn't require judgment, leaving judgment as the one thing left. The engineer's value has moved from "types fast, knows a lot of APIs, is willing to write boilerplate" to "knows which path is right, which line to stop at, which output runs fine but is wrong underneath."

build the loop, but build it like someone who intends to stay the engineer, not just the person who presses go.Addy Osmani, "Loop Engineering," June 2026
Source: this piece is a conference-style adaptation based on HuaShu's "Orange Book" open guide "Loop Engineering: Stop Asking Me What It Is" (v260615, June 2026). The framework and original quotes belong to Addy Osmani; the generator/evaluator discovery belongs to Anthropic's Prithvi Rajasekaran; the Stripe Minions enterprise case (1,300+ PRs a week) was disclosed by Stripe engineer Steve Kaliski on the How I AI podcast. Command version numbers (/loop since v2.1.72, /goal since v2.1.139) and scheduling parameters follow each tool's official documentation and may change across versions.
Source
Loop Engineering (论文 PDF)Loop Engineering (论文 PDF)·Read the source
↑ End of article
✓ This article is free to read in full

Members can copy or download the full Markdown, and let their AI subscribe and ask.

Read the original ↗
📮 New explainers, straight to your inbox

Found this useful? Leave your email — every new explainer, the moment it's out. Unsubscribe anytime.