AIToday
Large Language ModelsAI Coding AssistantsZenn AI/MLPublished: Nov 21, 2026, 16:00 JST

Claude Code works because it tests: agent = model + tools + loop

Send on LINE
Claude Code works because it tests: agent = model + tools + loop

3 Key Points

  1. What happened

    The explainer walks through a 'fix this date bug' request, showing Claude Code reading files, running npm test, finding one failure, fixing timezone handling, and only then reporting the fix.

  2. Why it matters

    Because the model only picks words by probability and can output plausible errors, agent reliability is seen to come from machine-checkable verification; where no test exists, 'done' stays self-reported.

Not sure about something? Ask the AI

Questions and answers are published on this page.

Summaries like this, every morning.

By signing up you agree to the Terms of Service and Privacy Policy.

Context & Analysis

The piece is the final installment of a six-stage walkthrough of a single request, and its payoff is structural rather than newsy. Earlier installments established that the model only returns text and picks each next word by probability, which is why plausible-looking mistakes appear. That premise sets up the question of how an app like Claude Code can nonetheless arrive at a report of a fix, and the answer is the split of labor between model and application: the model writes out which tool it wants in a set format, the application actually runs it, and the result is appended to the context for the next round. This back-and-forth is tool use, and the program driving it is called a harness — Anthropic's own phrasing, quoted in the piece, describes it as the loop that calls Claude and routes its tool calls to the relevant infrastructure.

Two consequences follow from that loop. To keep tool connections from multiplying per app and per tool, the piece points to MCP, which Anthropic published in November 2024 and donated to the Agentic AI Foundation under the Linux Foundation in December 2025. And because each round re-reads the accumulated context, long runs grow in cost and can overflow the window. The piece suggests durable files like CLAUDE.md and AGENTS.md as a backstop. It also flags prompt injection — including the indirect kind arriving through web pages or files — as a risk that follows from the model not reliably separating instructions from reference material.

FAQ
What exactly is an AI agent?
The explainer reduces it to 'model + tools + repetition'. Simon Willison's September 2025 definition, quoted in the piece, is an LLM agent running tools in a loop to achieve a goal.
What is MCP and who controls it?
MCP (Model Context Protocol) is an open-source standard for connecting AI applications to external systems, likened to a USB-C port for AI apps. Anthropic published it in November 2024 and donated it to the Agentic AI Foundation under the Linux Foundation in December 2025.
Why does a long agent run cost more?
Each loop adds files read and test results to the context, and the next round re-reads all of it. Since that volume is counted in tokens, a bigger context raises both cost and time — and overflow can drop the original instructions.
Send on LINE

AI news that matters for your work, delivered every morning.

Pick your industry and the AI tools you use, and get news related to your work every day.

By signing up you agree to the Terms of Service and Privacy Policy.

Free · 30 seconds with Google · unsubscribe anytimeWhat is AIToday? →

Ask AI

Ask AI anything about this article. The AI reads this article, earlier AIToday articles, and Wikipedia, and cites its sources. Q&As are published on this page for other readers too.

Questions and answers are published on this page.

Related Articles

Next articlenference, Cedars-Sinai to pool 5M patients' records for AI research