Pl. VI
Explainer
Pl. VI · Explainer
Inside the loop
Every page on this site was made by an AI model working in a loop: read, decide, act, read again. Here is one real task from that loop, replayed step by step, with the machinery around it explained.
§1 · Replay
Replay
The very first task in building this site was to set up the workspace: download the code, configure it, build it once and check that publishing would work. It took 9 tool calls in 77 seconds. The replay has 27 steps because each lap of the loop shows up as several: the model's turn, the tool call, and the result that comes back. Press Play, or drag the slider (arrow keys work on it too), to step through what the model saw and did. The commands and outputs are real. Only long commands and outputs are shortened, and private paths and secrets are masked.
Prompt 47,882 tokens in context
The user starts the session with one command:
/proceed
That expands into a written procedure. With the system instructions, the tool definitions and the project's notes, the model's context holds 47,882 tokens before it has done anything.
§2 · Loop
The loop
A language model can only produce text. What makes it an agent is the program around it, here Claude Code, and the tools that program offers. On each turn the model reads everything in front of it and writes an answer, or asks to use one or more tools, sometimes with a note alongside. A tool request might be "run this command" or "open this file". Claude Code carries out the request and adds the output to what the model can see. Then the model reads again.
The loop ends when the model replies without asking for a tool. The replay stops earlier, when the first task is written up as done. In the real session the loop kept going, task after task. Every tool call in between is one lap of the loop.
§3 · Context
The context window
The model has no memory beyond what is in its context: the text it reads on every turn. That includes the system instructions, the definitions of its tools, the project's notes, the conversation, and the output of every tool call so far. Before this session's first step, the context already held 47,882 tokens. For this model a token is, on average, a little over half an English word.
Until the limit gets close, nothing leaves the context; every result is added. In 2 hours 45 minutes and 325 model calls, up to the snapshot on 2026-09-25, the context grew to 789,945 tokens. That is most of the model's window of 1,000,000. When a session nears the limit, Claude Code first clears older tool outputs and then, if it needs to, summarises the conversation to make room.
§4 · Tools
Tools
Fig. 4 counts every one of the session's 358 tool calls. Most were Bash (264), which runs a shell command: building the site, running tests, taking screenshots, pushing to GitHub. Read (53) opens a file. Here that mostly meant looking at screenshots, which is how the model checks its own pages. Write (24) creates a file. The rest start subagents or talk to them, except one call that listed the running agents and one that loaded a skill, a packaged procedure like the one behind /proceed.
§5 · Permission
Permission
The model only asks for actions; Claude Code decides whether they happen, according to a permission mode. In manual mode it asks the person at the keyboard before most commands and file changes, and people can allow particular actions in advance. In auto mode, a second model screens each action and blocks risky ones instead of asking.
No person approved individual steps while this site was built. The session ran in auto mode, and the project's instructions give standing permission to publish once the checks pass. That makes the checks the safety net: every new page passes tests, screenshots and a reviewer before it goes live. Rules the model must follow, such as never printing the access token, are written in the project's own instruction file.
§6 · Subagents
Subagents
Some jobs need fresh eyes, or would crowd the context with detail. For those, the model can start a subagent. A subagent is a separate agent with a fresh context of its own, holding its instructions, the task and the project's notes but none of the conversation. It does the job and sends back only its final report. By the snapshot, this session had started 10 of them. 7 were visual reviewers running on a faster, cheaper model, Claude Sonnet 5. 3 ran on the same model as the main session: a number checker, a consistency reviewer and a fact-checker.
- Visual QA of T4 styleguide Sonnet
- Visual QA of T5 launch pages Sonnet
- Number QA of stats explorables same model
- Visual QA of T6 stats plates Sonnet
- Visual and aesthetic QA of T7 gallery Sonnet
- Milestone sweep 1 consistency review same model
- Fact-check the Keeling story same model
- Visual QA of the Keeling story Sonnet
- Visual QA of T21 explorable kit Sonnet
- Visual QA of T23 listings Sonnet
The main agent never sees a subagent's working, only its report. So it can ask for a thorough, adversarial review without paying for every screenshot the reviewer looked at in its own context.