Loop Engineering
Addy Osmani ยท article ยท 2026-06-07 Reader ๐ฅ๏ธ
Agent HarnessAgent SkillsCognitive SurrenderLoop EngineeringMCP (Model Context Protocol)Multi-Agent OrchestrationOrchestration Tax / Human Review Bottleneck
Loop engineering means replacing yourself as the person who prompts the coding agent turn-by-turn with a designed system โ automations, worktrees, skills, plugins/connectors, and sub-agents, plus externally-persisted state โ that prompts the agent for you; but because that system can't distinguish between someone using it to move faster on work they understand and someone using it to avoid understanding the work at all, the engineer's judgement doesn't disappear, it relocates one level up, from prompting to system design, which Osmani argues is harder, not easier.
practical ยท expository essay with an embedded framework (taxonomy of five building blocks + one worked example), closing in a hedged counter-argument โ Reads as the latest installment in Osmani's serial diagnosis (harness engineering -> orchestration tax -> intent debt -> loop engineering); it names and packages a practice rather than reporting an experiment, and structurally reverses itself at the end, undercutting its own contrarian headline.
Structure
| Part | Role |
|---|---|
| Opening definition + quoted authorities (Steinberger, Cherny) | thesis |
| "The five pieces, and then notes" | framework |
| Codex-app / Claude-Code comparison table | evidence |
| Per-primitive deep-dive sections | elaboration |
| "What one loop looks like" | worked example |
| "What the loop still does not do for you" | counterweight |
| Closing ("Build the loop. Stay the engineer.") | reframing conclusion |
Key terms
- Loop engineering Loop Engineering
designing the outer, autonomous system โ automations, worktrees, skills, connectors, sub-agents, persisted state โ that repeatedly invokes an agent harness without a human prompting each turn - Loop (as recursive goal)
"a recursive goal where you define a purpose and the AI iterates until complete" - Automations ("the heartbeat")
scheduled, cadence-driven runs that do discovery and triage on their own and route findings to a triage inbox, distinguishing a loop from a one-off run - /goal vs. /loop
/loop re-runs on a cadence; /goal keeps going until a separately-graded, verifiable stopping condition holds โ a fresh model grades whether the work is done rather than the model that did the work - Maker and checker
splitting the sub-agent that drafts/implements from the sub-agent that reviews/verifies, because the model that wrote the code is "too nice grading its own homework" - "Sits one floor above the harness"
loop engineering as a layer above his own previously-coined agent-harness engineering: the harness is what a single agent runs inside, the loop is what runs the harness on a timer and feeds itself
Propositions
- explicitcorroboratedLoop engineering is replacing yourself as the person who prompts the agent โ you design the system that does the prompting instead.conf: highsupports โHow Anthropic Builds And How Engineering Will Change Soon | Thariq Shihipar ยท p13 โ Both define loop engineering the same way: building a system that prompts the agent instead of prompting it yourself turn by turn.
- explicitcorroboratedA loop is "a recursive goal where you define a purpose and the AI iterates until complete" rather than something a human steers turn-by-turn.conf: highsupports โZero to Agent in 30 Minutes: From Prompting to Loop Engineering with Ofer Mendelevitch ยท p2 โ Restates the same core loop-engineering move -- swap step-by-step prompts for one end-state the agent checks itself against -- using a concrete coding example (a package resolver) rather than Osmani's general definition.
- explicitTwo well-placed practitioners โ Peter Steinberger and Boris Cherny (head of Claude Code at Anthropic) โ independently report they no longer prompt coding agents directly; they design loops that prompt the agents for them, and this convergent testimony is offered as the article's central evidence that prompting skill is being superseded as a differentiator.conf: mediumrefinesSoftware Teaming in the Age of AI with James Herr and Woody Zuill ยท p15 โ Zuill/Herr locate the valuable skill in communicating 'high-level intent' rather than coding-out-loud/turn-by-turn dictation; Osmani's claim refines this by relocating that same high-level-intent skill from live chat prompting into system design (automations, skills, sub-agent specs) that runs unattended.
- explicitdevelopedA loop requires five building blocks โ Automations (scheduled discovery/triage), Worktrees (parallel isolation), Skills (externalized project knowledge), Plugins/connectors (tool access via MCP), and Sub-agents (idea/verify split) โ plus a sixth non-negotiable: state/memory persisted outside the conversation, because the model forgets everything between runs but the repo doesn't.conf: highextends โagent-skills/docs/comparison.md at main ยท addyosmani/agent-skills ยท GitHub ยท p2 โ Loop-engineering's five building blocks name 'Skills' as one primitive in the abstract; this document supplies three concrete, competing implementations of that primitive with different organizing principles.
- explicitdevelopedLoop engineering sits "one floor above" agent-harness engineering: the harness is the environment a single agent runs inside, the loop is the outer system that runs the harness on a timer, spawns little helpers, and feeds itself.conf: highextendsAgent Harness Engineering ยท p2 โ Names a layer above the harness gap: if the harness gap explains why models underperform in a single session, loop engineering names the next-order gap โ most people still operate the harness by hand, turn by turn, instead of building a system that runs it for them.refines โWhat the Hell Is a Loop, Anyway? ยท p1 โ Osmani frames loop engineering as one floor above agent-harness engineering (a two-level model); Voss decomposes that single outer floor into four architecturally distinct tiers (execution/task/product/system) plus an oversight ring, showing the two-floor model undercounts the stack.
- explicitAll five loop primitives now ship as native features inside both the Codex app and Claude Code, whereas a year ago building a loop meant writing and personally maintaining a pile of bespoke bash scripts โ the capability moved from custom tooling into the products themselves.conf: highextendsAgent Harness Engineering ยท p10 โ One-year-later empirical update to the harness-convergence claim: convergence has moved up a layer, from harness features (tools, context) to loop features (automations, worktrees, sub-agents) now native in both major products.
- explicitestablishedThe single most useful structural element in a loop is separating the sub-agent that drafts from the sub-agent that checks, because the model that wrote the code is "too nice grading its own homework."conf: highsupportsAgent Harness Engineering ยท p7 โ Restates, at the loop layer, the same maker/checker separation-of-duties claim already established at the harness layer: self-evaluation is unreliable, a distinct evaluator agent is needed.supports โagent-skills/docs/comparison.md at main ยท addyosmani/agent-skills ยท GitHub ยท p5 โ Superpowers' two-stage subagent review (spec compliance, then code quality) is a concrete instantiation of the loop-engineering principle that the drafting sub-agent and the checking sub-agent should be separated because a model is 'too nice grading its own homework.'supports โInside a Software Factory ยท p8 โ Identical claim (agents are biased toward grading their own work favorably, so implementer and QA/reviewer must be separate agents), attributed to the same source (Addy Osmani) in both pieces; also echoed in extract-agent-harness-engineering#p7.supports โZero to Agent in 30 Minutes: From Prompting to Loop Engineering with Ofer Mendelevitch ยท p3 โ A concrete two-agent (Jam) instantiation of the structural element Osmani names as the single most useful loop primitive: separating the sub-agent that drafts from the sub-agent that checks.
- explicitSkills are where a loop stops re-deriving project context from zero every cycle: a skill externalizes intent (conventions, the "why," past incidents) once, so every iteration of the loop reads it instead of guessing at intent each session.conf: highextendsThe Intent Debt ยท p2 โ Applies Osmani's own intent-debt framing (externalized rationale an agent can read) specifically to skills-as-a-loop-primitive: a skill is intent written down once so the loop doesn't re-derive project context from zero every cycle.
- explicitcorroboratedPersisting state outside the conversation (a markdown file, a Linear board) is the trick every long-running agent depends on, because the model forgets between runs but the repo does not.conf: highsupports11 Tips For AI Coding With Ralph Wiggum ยท p5 โ Independently arrives at the same claim as the Ralph-Wiggum piece: because agent context starts fresh every run, state must be externalized to a committed file/board outside the conversation.supports โPaweล Huryn's Post ยท p9 โ Both identify persisting state outside the conversation, in files the repo keeps, as the mechanism that lets an agent 'remember' and improve across runs the model itself cannot.
- explicitcorroboratedWorktrees remove the mechanical failure mode of two agents colliding on the same files, but they do not remove the human review-bandwidth ceiling โ "the worktrees take away the mechanical collision but YOU are still the ceiling."conf: highextendsThe Orchestration Tax is You ยท p2 โ Explicitly credits his own orchestration-tax essay: worktrees remove the mechanical file-collision failure mode of parallel agents but leave the human's judgement throughput as the binding constraint untouched.supports โWhat the Hell Is a Loop, Anyway? ยท p11 โ Osmani claims worktrees remove mechanical file-collision but not the human review-bandwidth ceiling ('YOU are still the ceiling'). Voss supplies a concrete, named confirmation: Anthropic's own internal Claude Tag team, despite aggressive dogfooding, reports being bottlenecked on exactly that human review/conceptualization ceiling.
- explicitdevelopedVerification remains entirely on the human even inside a well-designed loop; "done" is a claim the loop makes about itself, not a proof, and a genuinely trusted verifier sub-agent is what makes that claim meaningful enough to let a human walk away.conf: highsupportsThe Orchestration Tax is You ยท p6 โ Restates that the orchestration tax โ the gap between what agents produce and what a human can actually verify/merge โ persists inside a fully designed loop; a verifier sub-agent doesn't eliminate the tax, it's the mechanism by which the human decides whether to trust the loop's 'done' claim at all.extends โSoftware Factories, Light and Dark ยท p10 โ Turns the prior post's observation that verification stays entirely on the human into a named systems-thinking rule ('back pressure') plus concrete, checkable criteria for how much autonomy verification capacity can support.extends โLoop Engineering: Building Blocks, Adoption, and Impact ยท p8 โ Confirms empirically, across 36,645 repositories, Osmani's claim that verification 'remains entirely on the human' even in a well-designed loop โ not one committed verifier subagent referenced by a loop artifact was detected.extends โOwn the Outer Loop ยท p12 โ Specifies where human verification lives inside a well-designed loop by naming four distinct outer loops (constraints, sampling, audit, ownership) rather than a single undifferentiated 'human in the loop.'
- explicitdevelopedComprehension debt (the growing gap between what exists and what the human actually understands) grows faster, not slower, as a smooth loop ships more code the human didn't write, unless the human keeps reading what the loop produced.conf: highsupportsCognitive Surrender ยท p3 โ Restates, in loop-engineering terms, that comprehension debt accumulates via exactly the mechanism Osmani's cognitive-surrender essay already names โ each unreviewed act of loop output is a small loan against future understanding.extends โSoftware Factories, Light and Dark ยท p7 โ Same author's earlier claim that comprehension debt grows with unread loop output is generalized here into the full dark/lit factory taxonomy and explicit criteria for when a loop is allowed to stay unread.
- explicitThe comfortable posture โ letting the loop run and no longer forming an independent opinion about its output โ is cognitive surrender; designing the loop is either the cure or the accelerant for it, "same action, opposite result," depending on whether it's built with judgement or to avoid thinking.conf: highsupportsCognitive Surrender ยท p1 โ Applies the offloading/surrender distinction directly to loop design: building a loop 'with judgement' is offloading the how while retaining the what; building it 'to avoid thinking' is surrender โ the same action producing opposite results.
- implicitdevelopedTwo engineers can build the structurally identical loop and get opposite outcomes depending on whether they use it to move faster on work they understand deeply or to avoid understanding the work at all โ the loop itself cannot tell the difference.conf: highextends โWhat the Hell Is a Loop, Anyway? ยท p10 โ Osmani argues a loop can't distinguish a practitioner using it to move faster on understood work from one avoiding understanding entirely โ a claim about individual psychology. Voss relocates the same tension into an explicit architectural mechanism: autonomy is a dial independently settable per loop tier, giving Osmani's binary framing something concrete to be tuned against.
- implicitThe article's opening contrarian claim ("you shouldn't be prompting coding agents anymore") is in real tension with its own closing counsel ("don't forget that prompting your agents directly is also effective... it's all about finding the right balance") โ the piece asserts a strong headline position and then substantially walks it back without ever giving a rule for when a task needs direct prompting versus a designed loop.conf: medium
Arguments
The individual engineer no longer needs to be skilled at turn-by-turn prompting; the skill that now matters is designing the loop that prompts the agent. strength: medium
Explicit premises:
- Steinberger and Cherny, both credible insiders, independently report they no longer prompt agents directly โ they design loops instead.
- The five loop primitives are now native, shipped features in both major coding-agent products, so building a loop no longer requires bespoke tooling.
- A worked example ("What one loop looks like") shows the human designing the system once, never prompting any individual step.
Implicit premises:
- Whatever made someone good at prompting (crafting the right instruction, iterating conversationally) transfers into system-design skill, and market/attention will reward the latter going forward.
- A maker/checker sub-agent split substitutes adequately for the human's own turn-by-turn judgement of quality.
Inferences:
- from 'credible insiders no longer prompt directly' plus 'the capability is now productized' to 'prompting skill is being superseded as the thing to get good at'
Loop engineering does not reduce the engineer's responsibility โ it relocates and intensifies it, into verification, comprehension, and resisting cognitive surrender. strength: high
Explicit premises:
- Verification is still on you; a loop running unattended is a loop making mistakes unattended, and 'done' is a claim, not a proof.
- Comprehension debt grows faster, not slower, as a smoother loop ships more code the human didn't write.
- The comfortable posture of no longer forming an opinion about the loop's output (cognitive surrender) is more tempting exactly when the loop runs itself.
- Two people can build the exact same loop and get opposite outcomes depending on their posture toward it.
Implicit premises:
- A system that increases agent throughput without a matching increase in human review/understanding capacity accumulates unpaid orchestration tax (drawn directly from Osmani's own prior orchestration-tax essay).
Inferences:
- because the loop cannot distinguish deep-understanding use from understanding-avoidant use, the engineer's judgement and design intent โ not the mere presence of the five building blocks โ is what actually determines the outcome
Narratives
- "What one loop looks like": a morning automation runs a triage skill that reads yesterday's CI failures, open issues, and recent commits, and writes findings to a markdown file or Linear board; for each worthwhile finding, an isolated worktree is opened and a sub-agent drafts a fix while a second sub-agent reviews the draft against project skills and existing tests; connectors open the PR and update the ticket; anything the loop can't handle lands in a triage inbox for the human; the state file is 'the spine' that lets tomorrow's run pick up where today's stopped.
โ makes the abstract five-piece framework concrete as a single illustrative composite scenario โ presented in first person as 'one shape I keep using,' with no named repo, no metrics, and no claim of measured outcomes; it is a plausibility sketch, not a case study
Questions addressed
- โ
What does 'loop engineering' mean and why would you build one instead of prompting an agent yourself?
A loop is a designed system (automations, worktrees, skills, connectors, sub-agents, persisted state) that autonomously finds work, hands it to agents, checks it, and decides the next step, replacing the human as the one holding the tool turn-by-turn. - โ
What concrete components does a loop require?
Five building blocks plus one place to remember state, mapped concretely onto both the Codex app and Claude Code. - โญ Does loop engineering eliminate the need for prompting skill and human judgement?
The piece answers this two different ways โ a strong 'yes, prompting is over' at the top and a hedged 'no, direct prompting is also effective, it's about balance' at the bottom โ without ever reconciling the two. - โญ How many loops/agents can one engineer responsibly run at once?
Referenced only by pointing back to the separate 'orchestration tax' post; not answered within this piece. - โญ Once a loop is triggered, which control-flow/algorithmic pattern should it actually run (critique-and-rewrite, plan-and-replan, tree search, debate, etc.)?
Never addressed โ the five building blocks are infrastructure/product primitives, not the algorithmic shape of what happens inside a single automated run.
Gaps
- incompleteThe piece never reconciles its own headline claim ('you shouldn't be prompting coding agents anymore') with its closing counsel ('prompting your agents directly is also effective... it's all about finding the right balance') โ there is no decision rule for when a task calls for direct turn-by-turn prompting versus a designed loop, despite building an elaborate five-piece taxonomy that implicitly argues for one side of that choice.
Read next: a follow-up should give selection criteria (task size, risk, reversibility, how well-understood the domain already is) for choosing loop vs. direct promptingclosed byWhat the Hell Is a Loop, Anyway? โ Osmani's piece never reconciles its headline ('stop prompting, design loops instead') with its closing counsel ('direct prompting is also effective, it's about balance'), and gives no decision rule for choosing between them. Voss's 'autonomy is a dial that exists separately on every one of the four loops' supplies exactly that rule: the choice isn't a single global prompting-vs-looping switch but an independently tunable setting per architectural tier, with the actionable question being what information sets each tier's dial correctly. - uninformedNo empirical evidence is given for the framework's actual payoff โ no data on defect rates, review time saved, or throughput versus direct prompting; the sole illustration ('What one loop looks like') is a first-person composite sketch with no named project or measured outcome. This is now the fourth Osmani post in this corpus (after agent-skills, orchestration-tax-is-you, intent-debt) to assert a structural framework backed only by anecdote and quoted authority rather than measurement.
Read next: look for any post-adoption data on loop engineering's effect on review burden or defect escape rateclosed byLoop Engineering: Building Blocks, Adoption, and Impact โ Supplies the empirical adoption and payoff evidence Osmani's piece lacked: a mining study of 36,710 open-source repositories finds confirmed autonomous agent loops in only 217 (0.59%), and shows the prescribed state/verifier/budget building blocks are almost never committed โ though direct payoff metrics (defect rates, review time, throughput) remain future work via the paper's own planned RQ3 experiment. - incompleteLike the two immediately preceding Osmani posts already flagged for this pattern in the corpus (extract-osmani-intent-debt#g1, extract-osmani-orchestration-tax-is-you#g1), loop engineering is framed entirely as an individual developer's system-design problem. Worktrees solve file-level collision between an individual's own parallel agents, but nothing here addresses queue-level collision between two engineers' independently-designed loops competing for the same review bandwidth, the same CI capacity, or the same triage inbox on a shared repo.
Read next: a team- or org-level treatment of loop engineering โ shared triage queues, loop ownership, review-capacity budgeting across engineersclosed byHow Anthropic Builds And How Engineering Will Change Soon | Thariq Shihipar โ Partially closes it: that gap flags loop engineering as framed entirely as an individual developer's problem, with no treatment of loops competing for shared review/CI/triage bandwidth. Thariq describes a team-scoped (not individual-scoped) loop system at Anthropic โ a shared set of triage/verification loops with dedicated skill and verification investment specifically so multiple changes can land safely into the same codebase โ which is a step toward the organizational, not just individual, framing the gap calls for. It does not fully close the gap: it still doesn't address two independently-designed engineers' loops directly colliding over the same review bandwidth. - incompleteThe five building blocks (an infrastructure/product-primitive layer: automations, worktrees, skills, connectors, sub-agents) are never cross-referenced against the algorithmic/control-flow layer already well covered elsewhere in this corpus (extract-20-loop-design-patterns' 20 patterns โ Generate/Critique/Rewrite, Reflexion, Plan/Execute/Replan, Tree Search, etc.). A reader who assembles all five primitives still has no guidance on which control pattern the automation should actually run once triggered; the two treatments address orthogonal axes of 'the loop' and neither acknowledges the other.
Read next: extract-20-loop-design-patterns for the algorithmic layer this piece is missing
Related documents
- Cognitive Surrender
- 11 Tips For AI Coding With Ralph Wiggum
- The Intent Debt
- Audit your Agent files
- Claude Code: Best practices for agentic coding
- How Claude Code works in large codebases: Best practices and where to start
- Developer Newsletter: New models, Claude Tag, and dynamic workflows
- 10 Things Developers Want from their Agentic IDEs in 2025
- Loop Engineering: Building Blocks, Adoption, and Impact
- My AI Kept Pushing Me to Ship, So I Asked It Why