Claude Code's Official Breakdown of Loop Design: 4 Escalating Levels to Unattended Autonomy
- Anthropic's Claude Code team published a blog post breaking "designing a loop" into 4 standard patterns: turn-based, goal-based (
/goal), time-based (/loopand/schedule), and proactive — escalating from low to high autonomy. - The official definition of a loop: an agent repeatedly executes rounds of work until some stopping condition is met. The four types are distinguished along four dimensions: who triggers it, how it decides to stop, which feature implements it, and what kind of task it suits.
- The core mechanism of
/goalis bringing in a separate evaluator model to judge whether the bar has been cleared — Claude itself can't just decide "good enough" and call it done — and you can also cap the maximum number of attempts. - Proactive loops stack five features together —
/schedule(time-based triggering),/goal(stopping condition), skills (validation criteria), dynamic workflows (multi-agent parallel orchestration), and auto mode (no manual confirmation) — to handle ongoing work like bug-report triage, issue classification, and dependency upgrades, unattended. - Two practical recommendations: use scripts for deterministic work — it's cheaper in tokens than making Claude re-derive it every time; and for large-scale dynamic workflows (which can spin up hundreds of agents), do a small-scale test run before going live.
90 and "hundreds of agents" cited in this piece are all drawn from the original — this is the official line.AI Does the Work — But Who Decides It's "Done"?
Claude Code team members Delba de Oliveira and Michael Segner published a post on Anthropic's official blog on June 30, 2026, laying out a systematic approach to designing "loops" for Claude Code: having an agent repeatedly execute work until it meets a stopping condition.
The authors open by pointing to a phenomenon: X is full of chatter about "stop prompting your coding agent one line at a time — design loops instead," but if you actually go look for what a loop even is, you'll find a pile of answers that contradict each other. This piece sets out to clear that up.
Below, we unpack the 4 levels of loops one by one, from simplest to most complex — each one should map onto some class of work you already deal with.
First, Get Clear: What Exactly Is a "Loop"
The official definition is a single sentence: a loop is an agent repeatedly executing rounds of work until some stopping condition is met. The key distinction is that "when it's considered done" is defined in advance and left to the system to judge — not something you personally chase round after round.
The authors classify loops along four dimensions, and these four dimensions form the shared reference frame for every loop type that follows: who triggers it, how it decides it should stop, which feature in Claude Code implements it, and what kind of task it suits best. Set up the coordinate system first, and then the four loop types slot right in.
A single prompt → manual, real-time → on a timer (interval) → an event or a schedule, with no one present at all
Claude decides for itself → hits the bar or the retry cap → you cancel it or the work is done → each task exits on its own bar, you shut down the whole pipeline by hand
Default conversation → /goal → /loop, /schedule → all of the above + dynamic workflows + auto mode
Short tasks → tasks with a verifiable exit criterion → periodic tasks or ones that touch external systems → recurring, clearly-defined workflows
