CCLearn

What a 200k window is actually spent on

verified against Claude Code 2.1.261 · 2026-09-0914 min

By the end you can

  • Name the things that load into context before you type a single character
  • Explain why a short prompt in a long session is not a cheap request
  • Predict roughly what a file read, a tool result and a hook each add
  • Say what "performance degrades as context fills" looks like from the outside
  • Know that a subagent reads in its own window, not in yours

Everything in the rest of this course is downstream of one sentence in the official guidance:

Most best practices are based on one constraint: Claude's context window fills up fast, and performance degrades as it fills. — Best practices

Two claims are bundled there, and they fail differently. Fills up fast is an economic problem — you run out of room. Performance degrades as it fills is a quality problem, and it arrives long before you run out. This lesson is about the first. The rest of Level 3 is about living with the second.

The window is not empty when you arrive

The most common wrong model of a session is that context starts at zero and your prompt is the first thing in it. It is not. A considerable amount loads before you type a character, and none of it is visible in your terminal.

Anthropic publishes an interactive walkthrough of a representative session (Context window). Its startup figures — explicitly described on that page as representative numbers, not a measurement of your machine — break down like this:

Loaded at startupRoughlyVisible to you?
System prompt4,200No
Project CLAUDE.md1,800No
Auto memory (MEMORY.md)680No
Skill descriptions450No
~/.claude/CLAUDE.md320No
Environment info280No
MCP tool names (schemas deferred)120No

That is roughly 7,850 tokens before your first word, against a 200,000-token window. Under 4% — which sounds like nothing, and is the point. The number that matters is not the percentage, it is the ratio to what you contribute. In the same walkthrough the user's opening prompt is 45 tokens. The project's own CLAUDE.md outweighs it forty to one.

Then it grows, and mostly not because of you

Once work starts, the things that add to the window are largely the agent's, not yours. From the same representative session:

During the workRoughly
Read src/api/auth.ts2,400
Read middleware.ts1,800
Read auth.test.ts1,600
npm test output1,200
Read src/lib/tokens.ts1,100
A grep for refreshToken600
A path-scoped rule loading alongside a matching file380
A prettier hook firing after an edit120
Your follow-up prompt40

Your follow-up costs 40. The four file reads that answered it cost 6,900. This is the arithmetic behind the rule you met in Level 1: describe the symptom and let the agent do the reading. It is not that your reading is worse — it is that your reading happens twice, once in your head and again in the window when you paste what you found.

Why a short question in a long session is not a short request

This explains a whole class of "why is this so expensive" confusion:

Claude Code sends your full conversation with every request, and each time Claude uses tools it sends another request carrying that batch of tool results. — Manage costs effectively

A one-line question at 5pm in a session you opened at 9am does not cost one line. It costs the whole day's conversation, again. Prompt caching softens the price — that history is re-read at the cached rate rather than the full one — but two things are still true: the tokens are still sent, and the cache expires. The documented lifetime is an hour on a subscription and five minutes on an API key or when drawing on usage credits, so the first message after a lunch break reprocesses everything at full price.

The practical reading: an old session is a standing charge on every message you send into it. That is the case for /clear, and Lesson 3.3 makes it.

The other half: quality, not just cost

The economics are the easy half. The reason context management is the spine of this course is the other claim:

LLM performance degrades as context fills. When the context window is getting full, Claude may start "forgetting" earlier instructions or making more mistakes. — Best practices

This is what makes context a quality control rather than a billing one. From the outside, a full window does not announce itself. It looks like a model that has got worse: it re-suggests something you already rejected, ignores a constraint you set an hour ago, or edits a file you told it was out of bounds. The instinct is to correct it again. The documented reading is that the correction is going into a window too full to hold it — which is why the fix in Lesson 3.3 is to stop and clear rather than to repeat yourself more firmly.

One exception worth knowing now

Not everything the agent reads lands in your window. A subagent runs in its own separate context window — its file reads never touch yours, and only its summary comes back. In the representative walkthrough, spawning one costs your window 80 tokens, whatever it goes on to read.

That single fact is the whole reason "use subagents to investigate X" appears in the best-practices guide, and it is why the infinite exploration failure pattern has two documented fixes rather than one: scope the investigation, or move it somewhere that is not your budget. Level 4 builds on this properly.

Checkpoint

Before the next lesson, answer these from memory rather than from the page:

  1. Roughly what fraction of a fresh 200k window is already spoken for before you type — and which single item is usually the largest of those?

    Show answer

    About 4% — roughly 7,850 tokens of the 200,000-token window, in Anthropic's representative session. The largest single item there is the system prompt at about 4,200 tokens, with the project CLAUDE.md next at about 1,800.

    The percentage is not the point, though. The ratio to what you contribute is: in that same walkthrough the user's opening prompt is 45 tokens, so the project's own CLAUDE.md outweighs it forty to one. And those are representative figures, not a measurement of your machine — your CLAUDE.md may be four times the size or absent, and MCP servers and skills move the numbers a lot. /context, in the next lesson, reads the real ones.

  2. Your session has been open for six hours. You send the word "why?". What does that request actually carry?

    Show answer

    The whole six hours. Claude Code sends your full conversation with every request, and every time it uses tools it sends another request carrying that batch of tool results — so a one-line question late in a long session costs the whole day's conversation, again.

    Prompt caching softens the price: the history is re-read at the cached rate rather than the full one. It does not remove it. The tokens are still sent, and the cache expires — a documented hour on a subscription, five minutes on an API key or when drawing on usage credits — so the first message after a lunch break reprocesses everything at full price. An old session is a standing charge on every message you send into it.

  3. Claude has just ignored an instruction you gave forty minutes ago. Name the explanation that has nothing to do with the model being bad today.

    Show answer

    The window is filling. Performance degrades as context fills, and when it is getting full Claude may start "forgetting" earlier instructions or making more mistakes — which from the outside is indistinguishable from a model that has simply got worse.

    The trap is the obvious response: correct it again, more firmly. That correction is going into a window too full to hold it, so repeating yourself is the one move that cannot work. The documented fix is to stop and clear — Lesson 3.3.

Sources