Chapter 6

The Agent Loop

An agent loop is the cycle Claude uses to make progress: gather context, take action, and verify the result. It repeats as needed, adapting to what it finds. See how Claude Code works.

A simple example

For a competitor comparison:

  1. Inspect: read the brief and existing sources.
  2. Act: collect missing evidence and draft the comparison.
  3. Check: verify claims, links, and missing fields.
  4. Repeat: fix gaps or report what could not be verified.

A tool returning successfully does not prove the whole task is complete.

Define the finish line

Done means the comparison covers all three competitors, every factual claim has a source, missing prices are marked unknown, and the draft is saved in the requested folder.

Also specify when to stop: missing access, conflicting instructions, or an action that needs your approval.

When work gets larger

Subagents can handle separate, bounded tasks. They are optional, and someone still needs to combine and review their results.

Hooks can run checks at specific workflow events. They help enforce repeatable checks; they do not replace judgment about the quality of the final work.

Start with one clear task and one review loop. Add complexity only when it solves a repeated problem.

Continue

Previous: MCP and Connectors

Next: Context Engineering

Want this set up for your business?

We turn these workflows into working marketing and sales systems.

Book a call