From Prompting Agents to Loop Engineering
The AI coding community is shifting from prompting agents manually to designing loops that prompt agents for you. This is the most practical, production-oriented guide available: what an agent loop is, why it matters, and what one looks like in the real world. The author breaks down the six mandatory components (trigger, isolation, written-down context, tool reach, second-agent checker, on-disk state), then illustrates with two concrete examples: a PR babysitter that checks every 15 minutes and auto-fixes CI failures, and Claude Code's /goal command. It also covers where cost actually goes (iterations, not tokens), when not to loop (one-shot edits, unbounded exploration), and predictable failure modes (verification burden stays human, comprehension debt, silent drift).