Anthropic's Loop Engineering Guide for Claude Code
Summary¶
Anthropic's loop-engineering guide reframes Claude Code usage as designing loops that run until a stop condition is met, rather than prompting turn by turn. It defines four loop types by autonomy level — turn-based, goal-based (/goal), time-based (/loop, /schedule), and proactive (schedule + goal + skills + workflows) — and stresses that the turn-based upgrade is to encode verification steps in a SKILL.md so the agent checks its own work.
Key Details¶
- Four loop types map to an autonomy ladder; most daily work still wants a single well-scoped prompt.
- The load-bearing pattern: bake measurable self-verification into SKILL.md so the agent stops being the verification step (guide's example is a browser-verify loop for UI changes).
- Loops cost more — a
/goalrun used ~3× the tokens of a single turn; pilot on a slice, set turn caps, route routine loops to cheaper models.