Context window

The maximum amount of text - measured in tokens - that a model can consider in a single pass. This includes your message, the conversation history, every file Claude has read, and every tool result returned so far. Claude models have large context windows, but large codebases can fill them up quickly. Skilled Claude Code users learn to manage context deliberately: use CLAUDE.md for standing context, open only the files that are relevant to the current task, and start a fresh session when the task changes significantly.

A context window is the total amount of text a model can hold in mind during a single pass, measured in tokens. In a Claude Code session it includes everything in play at once: your current message, the earlier back-and-forth, every file Claude has opened, and every result a tool has returned. The model cannot reason about anything outside that window, so the context window is effectively the working memory for the task at hand.

Claude models ship with large context windows, but a real codebase fills them faster than people expect. Reading a handful of big files, running a few commands that return long output, and carrying a long conversation can quietly consume most of the budget. When context gets crowded, quality drops: the model has to weigh too much at once, and important details from early in the session can get crowded out by noise from later. Recognizing the symptoms - vaguer answers, forgotten instructions - is the first step to fixing them.

Managing context is a core Claude Code skill. Put standing facts in CLAUDE.md so they load efficiently instead of being re-explained. Open only the files relevant to the current task rather than pointing Claude at the whole repo. Delegate sprawling exploration to a subagent so its reading stays out of your main thread. And when the task changes meaningfully, start a fresh session rather than dragging an exhausted context along. Deliberate context management is one of the clearest dividing lines between people who get reliable results and people who fight the tool.

Related terms

Put it to work

Learn it by building it

Definitions get you oriented. The club gets you shipping. Join Claude Code Club for $9/month.

Related: the full glossary, the learn hub, and our guides.