Context window

The context window is the amount of text, measured in tokens, a model can take in and attend to at once.

The context window is how much the model can hold in mind at once, counted in tokens. It covers everything in the request: the system prompt, your files, the conversation so far, and the tools. Every message adds to it.

When a Claude Code session nears the limit, it compacts the conversation: it summarizes the older turns so the thread keeps going instead of losing them. This happens automatically near the limit, or you can run /compact yourself. Either way, detail is lost in the summary, so state that has to survive is safer written down than left in the chat. Run /context to see how much of the window is in use.

Checked against Claude Code: context and /context (2026-10-23) , /compact (2026-10-23) .

All terms →