Skip to slide
014 / 170

CH 02 · The Agent Loop · 02/11

Read as one page

Why it matters

Understanding the loop demystifies everything else. Costs, context limits, the need for compaction, the value of subagents, the design of approval systems: all of them are consequences of this loop running and the prompt growing each time around. Once you can see the loop, the rest of the harness stops looking like a bag of tricks and starts looking like a set of sensible responses to one repeating process.

It also tells you where you can intervene. You (the user) are part of this loop. You can interrupt at any point to steer, add context, or redirect. The agent works autonomously but stays responsive. That is why Claude Code lets you press Escape to stop a running tool, or type a correction mid-stream that the model reads as soon as the current action finishes.

Finished this idea?

Your learning progress stays in this browser.