I asked Claude Code to make a small change to this blog: “Add previous and next post links at the bottom of every post.” Twelve words. It took 74 seconds and cost about 60 cents at API prices, and the links it built (with one small color tweak afterwards) are at the bottom of this page.
What I wanted to know is what actually happens in those 74 seconds. So I turned the session into a film you can watch in real time:
Watch The Agent Loop in 3D → There’s also a lighter 2D version if your computer struggles with 3D.

The idea came from Ryan Sael’s interactive pieces at sael.net, especially What Happens When You Send a Prompt. I wanted the same kind of thing for an AI agent, built from a real session instead of a made-up example.
Here’s what I learned from watching it.
My 12 words were a tiny slice
Before the model did anything, Claude Code sent it 41,933 tokens. My request was only a handful of them. The rest is setup: the system prompt, the definitions of every tool it can use, the list of skills I have installed, startup messages, and output from my plugins. That last part alone was about 16,600 tokens, which surprised me.
The model never touches your computer
The model can only write text. When it wants to look at a file or run a command, it writes a request, and Claude Code runs it on your Mac and sends the result back. In this session that happened five times: three times to read, once to make the change and build the site, and once to check its work.
It’s a loop, and every turn re-sends everything
Each of those round trips is a turn, and on every turn the whole conversation goes back to the model, not just the newest part. Six turns added up to 313,334 tokens read, for a task that started with 12 words.
What keeps that from getting expensive is caching. After the first turn, 90 to 97 percent of each request was read from the cache, which costs a fraction of the price of fresh input.
Most of the time is the model, not your computer
The tools on my Mac ran for 16.3 seconds in total, and 10 of those were the site build. The other 58 seconds were the model thinking and writing. The biggest single turn was writing the change itself: 1,631 tokens of code in one go.
It checks its work and tells you what it didn’t check
After the build, it opened all 22 post pages and confirmed each one had the right links. Then it reported back, and the report included what it hadn’t done: it hadn’t looked at the pages in a browser, and it hadn’t committed anything. It also pointed out on its own that two neighboring links could end up the same color.

The numbers
| Request | 12 words |
| Model | Claude Opus 5.5 in Claude Code |
| Turns | 6 |
| Time | 74 seconds |
| First request | 41,933 tokens |
| Most context used | 59,878 of 1,000,000 tokens |
| Tokens read in total | 313,334 |
| Tokens written | 3,486 |
| Cost | about $0.60 at API prices |
How I made it
Claude Code keeps a log of every session on your computer, in ~/.claude/projects/. Each turn in that log has a timestamp, the tools it called, and exactly how many tokens went in and out. A small script turns one log into a timeline, and the film plays that timeline back second by second, built with Three.js.
I’m not a technical person, so I didn’t write this code. I directed it and Claude built it: we started with a rough storyboard, recorded a fresh session, turned it into a 2D animation and then the 3D version. Which is a pretty good example of what the loop in the film is for.