Skip to content

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: your prompt leads to gather context, take action, verify results, repeating until complete

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.

Question 1What are the three phases of the agentic loop?

Question 2What is the "agentic harness"?

Question 3How do you interrupt Claude mid-task?