Skip to content
LinkedInX

The Context Window and Its Limits

Target audience: Those wanting a precise definition of the context window, those feeding long documents to AI
Prerequisites: Basic understanding of Context Engineering

The context window is the limit on how much information a model can process at once. It is measured in tokens rather than characters, and a single character can consume more than one token in some languages.

What Counts Toward It

The window covers output as well as input.

IncludedExample
System instructionsRole setup, rules to follow
Conversation historyEverything exchanged so far
Tool definitionsThe description text for available tools
Tool resultsSearch output, file contents
Generated outputThe response about to be written
This table scrolls horizontally. Keyboard users can focus the table and use the left and right arrow keys.

The commonly overlooked entries are tool definitions and tool results. Twenty tools consume a meaningful share through their descriptions alone, and a tool that reads whole files consumes heavily in a single call.

The Limit Is Not a Budget to Spend

Even on a model with a large window, filling it is a poor strategy. A model treats everything in context as evidence, so more unrelated material lowers the relative weight of what matters.

Little information passed
  → the instruction and source material land clearly

Information near the limit
  → technically processable, but the important instruction is relatively buried

The technical limit and the range where quality holds are different numbers.

Behavior Near the Limit

Past the limit, most implementations either truncate older history or return an error. When truncation happens, the important instruction given first can be the first thing removed.

Three responses apply.

  1. Summarize — compress older history down to decisions and constraints
  2. Drop — remove consumed intermediate results and full logs
  3. Split — divide the work and delegate to a subagent with its own window

Summary

  • The context window limits how much can be processed at once
  • It covers tool definitions, tool results, and generated output, not just input
  • Filling it lowers the relative weight of what matters and destabilizes judgment
  • The responses are summarizing, dropping, and splitting the work
Quiz