Chat → loops → graphs in Claude Code

Who holds the plan?

Chatting, looping and orchestrating with graphs are not three levels of skill. They are three answers to one question: who decides what happens next. Each answer trades control, cost and predictability differently.

You Chat: you steer every turn
Claude Loop: Claude steers toward a goal
A script Graph: the path is fixed in code
Source stated in a linked documentMy judgement my own reasoning, not from the sources
1 / 7

The basic unit is already a loop

Every Claude Code turn runs an agentic loop: gather context, take action, verify results, and repeat until the task is done. Each tool result feeds the next decision. This is the reason-then-act pattern described in the ReAct paper. So even plain chat in Claude Code is agentic. What changes along the scale is who closes the loop. Source How Claude Code works · ReAct (Yao et al., 2022)

Example task: one traffic count file
2 / 7

Slide control from you to a script

Drag the slider. The diagram and the facts change to show who decides the next step, what starts the next turn, what stops it, and where intermediate results are kept. The rows come mostly from Claude Code's own documentation. The road analogies are mine.

Six terms on this page, in plain English
Token
The unit AI usage is measured and billed in, roughly three quarters of a word.
Context window
The AI's working memory for one conversation: everything it has read and said so far. It has a size limit.
Subagent
A helper Claude starts for one piece of the work. It has its own working memory and reports back a summary.
Workflow script
A short program Claude writes that sets out which helpers run, in what order. Claude Code runs it in the background.
Script variables
Where the script keeps each helper's result, outside Claude's working memory.
Fan-out
Starting many helpers at once, one per item, such as one per file.

Typical token use vs a plain chat with no tools Source Anthropic, multi-agent research system

3 / 7

Six patterns, one building block

Anthropic separates workflows ("LLMs and tools are orchestrated through predefined code paths") from agents (LLMs "dynamically direct their own processes and tool usage"). Every pattern is built from the same block: an LLM with retrieval, tools and memory. Choose a pattern to see its shape, when to use it, and how it fails. Source Building Effective Agents

When to use it

How it shows up in Claude Code

Example from my work My judgement

How it goes wrong

4 / 7

Which should I use?

Answer six questions about a task, or load an example. The rule behind the recommendation is my own summary of the sources: start with the simplest option, and add structure only for a reason you can name. My judgement

Recommendation

    5 / 7

    Applied to my work

    Tasks from my own work (TARA, consulting bids and this site) placed on the scale. All the placements are my judgement. Test them on a small piece of the task before you rely on them. My judgement

    TaskWhere it sitsWhy
    6 / 7

    Common misconceptions

    7 / 7

    References

    1. Building Effective Agents. Anthropic, December 2024. Workflows vs agents, the six patterns, and the advice to start simple.
    2. How Claude Code works. Claude Code docs. The agentic loop, interrupting and steering, subagents and context.
    3. Run prompts on a schedule. Claude Code docs. /loop: fixed and self-paced intervals, stopping, the 7-day expiry.
    4. Keep Claude working toward a goal. Claude Code docs. /goal and its separate evaluator model.
    5. Orchestrate subagents at scale with dynamic workflows. Claude Code docs. Who holds the plan, limits, cost.
    6. How we built our multi-agent research system. Anthropic Engineering. Token multiples, and when multi-agent setups fit or don't.
    7. ReAct: Synergizing Reasoning and Acting in Language Models. Yao et al., 2022.
    8. Ralph Wiggum as a "software engineer". Geoffrey Huntley, July 2025. The plain bash while-loop version of an agent loop.
    9. LangGraph overview. LangChain docs. The best-known graph framework outside Claude Code.

    How this was written: Drafted with AI (Claude), edited and verified by the author.