You already know how to hold a long conversation with Claude Code. Now it is time to manage one: know how much room is left, and clean up at the right moment. It all starts with one idea — the .
What the context window is
Everything that happens in a session, Claude “holds in its head” at once: your requests, its own answers, the contents of every file it read, and the project memory it loaded — , for example. Together, that is the context window.
The window is large, but not infinite. More importantly, everything in it competes for the model’s attention. If in one session you first fixed tests, then discussed a design, then hunted a memory leak, Claude arrives at the fourth task carrying the weight of three earlier ones. Details from those start getting in the way.
/context: the session dashboard
Inside a session, type:
/context
Claude Code draws a coloured grid: how much of the window is used, and by what. Your messages and the memory files picked up at startup appear as separate categories. If the project has no CLAUDE.md, that category may not appear at all.
Ask one question about the code and type /context again — the “messages” share grows noticeably. Files Claude reads inflate it the most: ask it to explain a big module and it will read the whole thing.
When to look
A good habit is to check /context in three situations:
- before a big task, to see whether there is room for all of the work;
- when the answers get worse — Claude mixes up details, repeats itself, or forgets something agreed at the start of the conversation;
- after Claude has read a lot of files, for example when it first gets to know a project.
What to do when the window is full is the next lesson: there you will learn to compact the conversation and to start fresh without losing what matters.
Quick check
Claude has started mixing up details you discussed an hour ago. Where do you start?
Careful
Project memory takes up room too. A huge, thousand-line CLAUDE.md eats part of the window in EVERY session before you have asked a single question. Keep it short, and move the details into skills — their body loads only when it is needed.