liveBook · Manning

Context window

As explained in Claude at Work

A context window is the maximum amount of tokenized input and conversational context a model can process in one interaction.

A context window is the maximum amount of tokenized information a model can handle in one interaction. Prompts, replies, and tool results all add to the conversation’s running context; research that loads web pages or files can make it grow quickly. When a session approaches its limit, it may stop, though Claude Code can summarize and compress context to continue. section 1.4.1

Use context size as one consideration when working with Claude:

  • Start a new session with the problem, relevant files, architecture decisions, and constraints; previous conversation context does not normally carry over. section 1.4.1
  • Choose a model to fit the task and usage limits: Sonnet is a day-to-day option, Opus suits complex reasoning over large inputs, and Haiku suits simple tasks. section 1.4.2

Research can expand context quickly

A web-research turn that searches and loads pages can add thousands of tokens. Repeated tool results accumulate alongside prompts and replies, so a long session can approach its context limit. section 1.4.1

Figure 1.2 How context builds over the turns of a conversation. The input grows cumulatively and there can be huge jumps from tool use when Claude is researching file content or web pages.
CH01 F03 Stoneman

The figure illustrates how conversation context accumulates across turns, with large increases when tools load files or web pages. section 1.4.1

How Claude at Work covers it

How deep it goes
Explains cumulative prompts, responses, and tool results, but does not detail token-counting mechanics.
Examples
Uses web research that loads pages, large codebase inputs, and a figure of context growth across conversation turns.
What you can do after
Evaluate context growth, provide essential setup in fresh sessions, and choose a model according to task demands and usage limits.
How it connects
Connects context windows with tokens, conversation history, tool use, model selection, and Claude Code summarization.

Also explained in

Compare how 38 books explain context window →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Claude at Work. The section links point to the parts of the book it draws on.