Skip to content

Anthropic

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

Written by an AI model from the linked sources and checked against them by a second model. How we work

All about: Claude Code versions and changes →

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.

No comments yet. Be the first.

Join the conversation

Sign in to leave a comment. It appears after moderation.