The agentic loop
When you give Claude a task, it works through three phases: gather context, take action, and verify results. These phases blend together — Claude uses tools throughout, chaining dozens of actions and course-correcting along the way.
The agentic loop, redrawn from the official docs in Patterson brand colors.
The loop adapts to the ask. A question about your codebase might only need context gathering; a bug fix cycles through all three phases repeatedly. You are part of the loop too — press Esc to interrupt and steer at any point.
The loop is powered by two components: models that reason and tools that act. Claude Code is the agentic harness around the model: it provides tools, context management, and the execution environment that turn a language model into a capable coding agent.
Check your understanding
Section titled “Check your understanding”Question 1What are the three phases of the agentic loop?
Gather context → take action → verify results, repeating until the task is complete.
Question 2What is the "agentic harness"?
The harness is everything around the model that lets it act: tools, context management, execution.
Question 3How do you interrupt Claude mid-task?
Esc stops Claude immediately; you can also type a correction and press Enter without stopping the running tool.