Hypermile

Context

The Claude Code context window (2026): what fills it and why it matters

Mechanics accurate as of August 2026.

The context window is the working memory of a session. Almost everything in it got there without you typing it.

TLDR: The context window holds your instructions plus everything the agent gathered — file contents, command output, and prior turns. It fills mostly with material you never typed. When it runs out the session must shed history, which costs both continuity and tokens, because the same files often get re-read afterwards. Context pressure and usage limits are separate meters that share a cause.

Short answer: the context window is the working memory of a Claude Code session — instructions, file contents, command output, and the conversation so far. What surprises most people is the ratio. The overwhelming majority of what occupies it is material the agent gathered on your behalf, not anything you typed.

What is actually in there

At any moment during an agent session, the window holds roughly:

Reading that list back, the reason it fills quickly becomes obvious. One verbose test suite can occupy more of the window than a long conversation. A dependency install can produce hundreds of lines of noise that carry almost no signal about your code.

Why it fills faster than you expect

Three patterns dominate, and none are about prompt length.

Command output arrives whole. When the agent runs something, it generally takes the full output. Most of a build log is scaffolding — progress lines, timestamps, unchanged warnings — but it all lands in the window.

Files get re-read. As a session goes on and history compresses, the agent loses precise recall of what it already saw and reads the same files again. In a large repository this can happen many times per session with the same handful of files.

History accumulates. Early turns stay in context long after they stopped being relevant, unless something removes them.

These are the same patterns that drive token spend generally, which is why the cost of Claude Code and context pressure tend to show up together.

What happens when it runs out

The session cannot simply stop, so it sheds. In practice that means summarising or dropping earlier turns to make room — the mechanics of which we cover in Claude Code compact.

There are two costs. The obvious one is continuity: detail you were relying on may be gone, and you may have to restate context you had already established. The less obvious one is tokens. Compaction itself costs something, and afterwards the agent frequently re-reads files it had already processed, because the specifics were dropped along with the history.

Context window versus usage limits

These get conflated constantly, and they are different meters.

Context windowUsage limits
ScopeOne requestYour account over time
What it boundsHow much the model considers at onceHow much you may consume per window and per week
What happens at the ceilingHistory is compactedYou are throttled until reset
Fixed bySending less per requestSending less overall

They share a root cause. The noise filling your window is the same volume being counted against your 5-hour window and weekly cap. Reduce it once and both improve.

Working with it rather than against it

A bigger window is not the fix people hope for. It raises the ceiling without reducing what you send, and every token in it still counts against your limits — filling a larger window with the same noise costs more, not less.

The changes that actually help are the unglamorous ones: keep sessions scoped to a task rather than a whole afternoon, avoid piping enormous command output through the agent when you could read it yourself, and start fresh sessions at natural boundaries rather than letting one run all day.

Beyond that, the leverage is in what reaches the model at all. The free hypermile-audit CLI reads your local transcripts and shows which files and commands are consuming your window and your allowance. Hypermile goes further and trims that noise reversibly before it is sent, so the window holds more of your actual work — download it here.

Frequently asked questions

What is the Claude Code context window?

It is the working memory of a session — the total amount of text the model can consider at once. It holds your instructions, the contents of files the agent has read, the output of commands it has run, and the conversation so far. When it is full, something has to be dropped or summarised before work can continue.

Why does my context window fill up so fast?

Because most of what enters it is not typed by you. A single verbose test run or build log can occupy more of the window than an entire conversation, and agents commonly re-read the same files on later turns. Repository shape matters more than prompt length.

Is the context window the same as my usage limit?

No. The context window is a per-request ceiling on how much the model can consider at once. Usage limits are account-level meters over time — a rolling window and a weekly cap. They are separate, but they share a root cause, because the same noise that fills context is also the volume being metered.

What happens when the context window is full?

The session has to shed history, typically by summarising or dropping earlier turns. You lose some continuity, and there is a token cost to the process itself — plus a follow-on cost when the agent re-reads files it had already seen because the details were dropped.

Does a bigger context window fix the problem?

It raises the ceiling rather than reducing what you send. A larger window means you can go longer before compaction, but every token in it is still counted against your usage limits. Filling a bigger window with the same noise costs more, not less.