An illustrated explainer

Read the Loop

How an AI coding agent actually works, shown on real sessions we recorded and you can step through.

Chapters

  1. Chapter 1

    An agent is a loop

    A model can only read text and write more. Watch a real session fix a bug in a small game it never sees, one round at a time.

  2. Chapter 2

    The context window

    How much the model reads on every call, and what that adds up to over a real session.

  3. Chapter 3

    Caching

    Why reading the whole conversation again is cheap, and what breaks the cache.

Coming next

  1. Chapter 4 · Coming soon

    Compaction

    What happens when the conversation is squeezed into a summary, and what the agent still knows afterwards.

  2. Chapter 5 · Coming soon

    Tools and permissions

    What the model is told about each tool, and who decides what may run.

  3. Chapter 6 · Coming soon

    Subagents

    A fresh conversation for a side task, and what comes back from it.

  4. Chapter 7 · Coming soon

    Failure modes

    Loops, made-up functions, a false “done”, and the guard rails against each.

  5. Chapter 8 · Coming soon

    Build your own agent

    A small agent you can run in your browser, on a model replayed from a recording.