The Event
On June 30, 2026 at 17:28 UTC, Anthropic published "Getting started with loops" on its official blog, written by Delba de Oliveira and Michael Segner of the Claude Code team.
The article did something Anthropic had never done before: it formally divided "agent loop" — a term used loosely by vendors and open-source communities for two years — into four official types, each with recommended usage.
1. Turn-based loop
- Trigger: each user prompt
- Stop condition: Claude decides it's done or needs more context
- Use case: non-recurring, short tasks
- Core mechanism: Claude reads code → edits → runs tests → self-checks → repeats → returns what it believes is complete
- Optimization: encode human verification steps into
SKILL.mdso Claude can self-check end-to-end - Trigger: real-time user prompt
- Stop condition: goal achieved or maximum turns reached
- Use case: tasks with verifiable exit criteria
- Core mechanism: deterministic criteria like
/goal get the homepage Lighthouse score to 90 or above, stop after 5 tries, checked by a separate evaluator model; if the goal isn't met, work is sent back - Key design: deterministic conditions (passing test counts, score thresholds) beat free-form judgment
- Trigger: fixed time intervals
- Stop condition: user cancellation or task completion (PR merged, queue empty)
- Use case: periodic work (morning Slack summaries) or integration with external systems
- Core mechanism:
/loop 5m check my PR, address review comments, and fix failing CI— local time-based looping/schedule— moves the loop to the cloud- Optimization: prefer event-driven triggers over time-driven ones
- Trigger: events or schedules, with no human present
- Stop condition: each task exits on goal completion; the routine runs until the user turns it off
- Use case: long-running workflows (bug report triage, dependency upgrades, issue triage)
- Core mechanism: combines
/schedule+/goal+ dynamic workflows + auto mode - Full example:
/schedule every hour: check #project-feedback for bug reports. /goal: don't stop until every report found this run is triaged, actioned, and responded to. When fixing a bug, use a workflow to explore three solutions in parallel worktrees and have a judge adversarially review them. - Maintain code quality — encode "what counts as good" in SKILL.md, and use a second agent for code review (independent context, uncontaminated by the main agent's reasoning)
- Manage token usage — dynamic workflows can spawn hundreds of agents; pilot small before scaling, and use scripts instead of reasoning wherever possible
- Safety boundaries of proactive loops — unattended agents running on user machines, if hijacked via prompt injection, could cause serious harm (see 0DIN's Claude Code repo-poisoning research).
- The evaluator itself is a new model — its judgment quality determines goal-based loop quality; a weak evaluator stops too early or iterates too long.
- Dynamic workflows spawning hundreds of agents — token cost and context management are new problems; the post suggests piloting first but offers no standard playbook.
- Trust in the tool itself — recent controversies around Anthropic make "trusting Claude Code to run autonomously on my machine" a question readers should weigh before adopting proactive loops.
- Official blog: https://claude.com/blog/getting-started-with-loops
- Claude Code docs: https://code.claude.com/docs/en/goal, https://code.claude.com/docs/en/routines, https://code.claude.com/docs/en/workflows
2. Goal-based loop (/goal)
3. Time-based loop (/loop + /schedule)
4. Proactive loop
The post also includes two extensions:
Analysis
The real significance of this post isn't teaching you the /goal command — it's that Anthropic has finally established an official tiering of the "agent paradigm."
For the past 18 months, the word "agent" has been used chaotically: ChatGPT with tool calling is an agent, AutoGPT running 5 steps is an agent, CrewAI orchestrating multiple roles is an agent, Claude Code writing a file is an agent.
What Anthropic did here is draw the first engineering taxonomy of the term — classifying along "trigger method × stop condition × user presence."
1. Choosing a loop type is essentially choosing how often the user intervenes
| Loop type | User intervention | Task length | Risk | |---|---|---|---| | Turn-based | Every turn | Short | Low | | Goal-based | At setup + termination | Medium | Medium (wrong evaluator runs away) | | Time-based | At configuration | Medium-long | Medium (polling wastes tokens) | | Proactive | Almost none | Long | High (unattended, costly failures) |
The higher the tier, the greater the automation — and the larger the "invisible cost" of failure.
2. The real innovation of /goal: explicitly separating "goal" from "turns"
Previously, users mixed the two:
> "Fix this bug, and retry if it doesn't work" (how many times? unsaid)
/goal splits these into explicit parameters: goal (Lighthouse ≥ 90), turns (5), and judgment method (independent evaluator). This is contract-based testing applied to agent design — you write a contract with the agent; the agent explores freely within it and must stop outside it.
3. Proactive loop is the prototype of "agent as a service"
The fourth type is the most thought-provoking: a routine that runs continuously, triggered by events, with self-defined goals, self-stopping on completion — essentially a SaaS-shaped agent, running 24/7. Claude Code's official endorsement pushes this from "grassroots experiments" into the mainstream.
4. SKILL.md gets a second spotlight
SKILL.md is Claude Code's skill-definition file — what counts as done, how to verify it, which tools to use. SKILL.md + goal + dynamic workflows form Anthropic's "agent engineering trinity." We used to write prompts; going forward we'll write SKILL + goal + routine, with prompts reduced to high-level intent.
Why It Matters
1. First official four-quadrant taxonomy of agent loops — the first time a major vendor has drawn a clear product-tier map of the agent paradigm; others will align with it.
2. /goal explicitly separates goal and turns — this contract-based approach is a key step in agent engineering and may become an industry standard.
3. Proactive loop = agent as a service — long-running AI routines will be a new product form over the next 6–12 months, now officially backed by Claude Code.
4. SKILL.md engineering — turning "what counts as good" from tribal memory into code files is infrastructure for scaling agent teams.
Risks and Open Questions
This Anthropic post is less a tutorial than a manifesto: the agent is not a "tool" concept but an "engineering paradigm" concept. Whoever builds the agent-engineering infrastructure first will capture the dividends of the next three years.