The shared context window
Core anatomy for explainers about documents, agents, and long conversations.
EXPLORE THE WORKING MEMORY
A context window is shared space. Your instructions, tools, conversation, retrieved evidence, source material, and the model's answer all compete for tokens.
CHOOSE THE LOAD
LIVE CONTEXT MANIFEST
—
This is a planning estimate. Tokenization varies by model and encoding. A fit result measures capacity, not whether the model will use every distant detail reliably.
THE MECHANISM
A context window is the model's working memory for one generation. Everything sent with the request can count: instructions, messages, documents, images represented as tokens, tool definitions, and tool results. Space must also remain for the response.1
“128K context” therefore does not mean “paste 128K tokens of source material.” The usable artifact budget is what remains after the rest of the request and the output reserve are subtracted.
The English prose presets begin with OpenAI's published rule of thumb—roughly four characters or three-quarters of a word per token—but retain an uncertainty range because exact tokenization varies by model and encoding.2 Different tokenizer pipelines normalize and split text differently, including different treatment of punctuation, spaces, bytes, words, and subwords.3
OPEN ASSET FACTORY
Each diagram is editable SVG source with a publication-ready PNG. The language stays model-neutral so the durable teaching layer does not expire with a product release.
Core anatomy for explainers about documents, agents, and long conversations.
A range-based equivalence chart with its assumptions printed on the asset.
A three-stage mechanism for history growth, overflow pressure, and compaction.
CLAIM LEDGER · CHECKED 2026-09-07
What occupies context. Anthropic documents that the request's system prompt, messages, tool results, documents, images, and tool definitions count toward context, as does generated output. Primary source ↗
English token rule of thumb. OpenAI documents approximately four characters or three-quarters of an English word per token and recommends model-specific counting for exact results. Primary source ↗
Why exact counts vary. Hugging Face describes tokenization as a pipeline whose model maps text into word or subword IDs and whose normalization, pre-tokenization, and post-processing rules differ. Primary source ↗
Kingy planning assumptions. PDF pages use 667 tokens/page; prose uses 1.333 tokens/word; code uses 10 tokens/line; transcripts use 200 tokens/minute; agent runs use 2,500 tokens/turn. These are editable planning defaults, not provider specifications. Their default uncertainty bands range from ±20% to ±50%.
Capacity is not recall quality. Long-context documentation explicitly warns that more context is not automatically better and that accuracy and recall can degrade as context grows. The calculator therefore makes no prediction of retrieval or reasoning quality. Primary source ↗