Context Window Size

Context Window Size

The context window is the total "working memory" a model can hold at once; it includes both its input and output, measured in tokens. Context Window size is functionally the length limit.

A session (conversation) length limit is based on the underlying model when that session was created. Moving from a large context window to a smaller one will result in conversation information loss.

Claude Code will auto-compact the session when it gets close to the limit, summarizing older content to make room. /compact can be used to manually trigger summarization.

Related: Models, Session, Usage Limits and Length Limits