Claude Code context window: how big it is and what fills it

The context window is everything Claude Code is sent on each turn: its instructions, your tools, the files it has read and the whole conversation so far. Its size depends on the model: 1 million tokens on most current models, 200,000 on some older ones. Run /context to see what is in yours.

How big is it?

Anthropic's documentation lists a 1 million token window for its current models (the Fable, Opus, Sonnet and Haiku lines from recent versions on) and 200,000 tokens for older ones. For some models the larger window is a separate variant you pick with /model, and whether it is included depends on your plan. The quickest way to know what you have is /context, which shows the size and how full it is.

A bigger window is room, not a discount. Everything in the window is sent again on every turn, so a session sitting at 400,000 tokens costs about twice as much per turn as the same session at 200,000.

What is in it before you type anything

A new session is not empty. According to the Claude Code documentation, these load at the start:

This is the session's starting size, and you pay it on every turn. On the author's Mac, ordinary sessions started at about 126,000 tokens, and sessions with fewer tools switched on started at about 66,000. What connectors and plugins add.

What fills it as you work

None of it leaves until the session is compacted or cleared. That is why a session only ever gets more expensive per turn.

What happens when it fills up

Claude Code compacts automatically as you approach the limit, so a full window does not end your session. Compacting replaces the conversation with a summary. Afterwards the system prompt still applies, the project's CLAUDE.md and auto memory are loaded again from disk, and a few recently changed files are re-read. The detail of the earlier conversation is gone.

Anthropic also notes that accuracy and recall get worse as the token count grows, which it calls context rot. A fuller window is slower, dearer and less reliable, well before it is full.

How to see what is in it

How to keep it small

Cost Doctor shows, for each of today's sessions, the size it started at and the size it is now, and says which one to compact. The free costdoctor command prints the same list in a terminal.

The session figures on this page come from real logs on the author's Mac, read with Cost Doctor. Your numbers will differ; the pattern usually does not.

Facts about Claude Code on this page are from Anthropic's documentation as checked on November 10, 2026: the context window, managing costs and context windows. Window sizes and plan rules change with new models; check those pages for the current ones.

See it on your own sessions

Cost Doctor is a Mac menu bar app that reads the logs Claude Code and Codex already write. It names the session that is using your tokens, says why, and turns your screen red when a check fails while an agent sits waiting. Nothing leaves your Mac.

Download the free trialHow it works

14 days free, no account. Then $19 once, plus tax where it applies. For Apple silicon and Intel Macs on macOS 13 or later.