Claude Code has four kinds of agent loops: /goal, /loop, /schedule

Anthropic's guide sorts agentic loops into four types, based on what the developer hands the model.
• Step loop: Claude reviews its own work, as long as the review steps are spelled out in SKILL.md • Goal loop: /goal sets a success criterion and an attempt limit. An evaluator model sends Claude back to work every time it tries to stop. The guide's example: push the homepage Lighthouse score to 90 or above, stop after 5 attempts. • Time loop: /loop reruns a prompt on an interval on the developer's machine, /schedule moves the routine to the cloud. • Proactive loop: fires on an event or a schedule with no human in the loop, and each task ends when it hits its own goal.
Two commands for keeping tabs on cost: /usage breaks down recent spend by skill, subagent, and MCP, and /goal with no arguments shows the turn count and tokens burned.
Related stories
- Anthropic rewrites its context engineering rules for Claude 5
- Claude Code sessions can now talk to each other
- Letting Claude filter its own tool output took Opus 4.6 from 45.3% to 61.6% on BrowseComp
- A hardcoded instruction in Claude Code 2.1.219 and 2.1.220 blocks Opus 5 from spawning sub-agents
- Analysis of the agent control model in Claude Code
- Claude integrates with Lovable
Comments
No comments yet. Be the first.
Join the conversation
Sign in with Google to leave a comment. Your name and avatar come from your Google profile, and the comment appears after moderation.
