technicals

What is a context window?

June 1, 2026 · 5 min read

CONTEXT WINDOWIt all shares onefixed box.Fill it up and the oldest falls off.What you put inprompt · files · historyroom forthe replyLIMIToldestdropsIt's the AI's working memory, not storage.

Definition

A context window is the maximum amount of text, measured in tokens, that an AI model can hold in view at one time, covering both what you send and what it writes back.[1]

At a glance

How it works

The window is the AI’s desk, not its filing cabinet: it can only reason about what is on it right now. When the desk fills, the oldest material slides off and is gone[5]. The model’s reply comes out of the same budget, so a huge input leaves little room for a long answer[4].

Why bigger is not always better

2026 models offer 200K to 1 million tokens, enough to drop in a whole contract or codebase[3]. But reliability suffers: models use the start and end of a long window well and lose track of facts buried in the middle[2]. The advertised size is optimistic too — a model rated for 200K often gets shaky closer to 130K[3].

Bottom line

Don’t chase the biggest window; feed the model the smallest, most relevant slice that answers the question.

Connects to Computer ScienceEconomics

References

  1. What is a context window? IBM www.ibm.com
  2. Lost in the Middle: How Language Models Use Long Contexts — Nelson F. Liu, Kevin Lin, John Hewitt, Ashwin Paranjape, Michele Bevilacqua, Fabio Petroni, Percy Liang. Transactions of the Association for Computational Linguistics (MIT Press) arxiv.org
  3. Claude Context Window (2026): 200K Tokens, 1M Beta, Model Comparison. Morph www.morphllm.com
  4. Pricing - Claude API Docs. Anthropic platform.claude.com
  5. LLM Context Windows Explained: 4K to 1M Tokens (2026). DevTk.AI devtk.ai