What the context window is
The context window is all the text a model may use when producing one answer. It is counted in tokens (roughly word fragments). It includes the instructions, every earlier message, any pasted documents and the answer being written. The model itself keeps nothing between chats. Memory features in apps typically work by inserting stored text back into the window; Anthropic describes agent notes the same way, kept outside the window and loaded back in. What is not in the window does not exist for the model when it answers.
Each new message is appended at the end, and for the next answer the model reads everything again from the top. A chat therefore works like a document that is re-read in full before every reply.
What I saw in my own numbers
On 27 January 2026 I exported the usage log of an AI agent in a code editor, covering the period from 29 December 2025, and added it up. It came to about 790 requests and 575 million tokens. Around 90 % of the tokens were what the editor labels cache reads, meaning earlier context that was read again. Newly generated text was about 1 %. The median request carried roughly 450,000 tokens, and 158 requests went above one million.
So when working with an agent, almost all of the volume is history carried along on every step. This figure measures volume, not answer quality, and it comes from one tool, one person and one month.
Why quality drops as the input grows
Liu and colleagues (2023, TACL 2024) gave models questions over 10, 20 or 30 documents and varied where the answer-bearing document sat. The result is U-shaped: models did best when the answer was at the start or the end and worst in the middle. For GPT-3.5-Turbo, accuracy with the answer in the middle could fall by more than 20 %, and in the worst case below what the model scored with no documents at all (56.1 %). The models were from 2023.
Chroma (July 2025) tested 18 models, including Claude 4, GPT-4.1 and Gemini 2.5 families. Reliability fell as input length grew, even on simple tasks. Distractor passages similar to the target information lowered accuracy further. On the LongMemEval benchmark, models did better with about 300 tokens of focused text than with the full prompt of about 113,000 tokens. Anthropic’s engineering team puts it as context being a finite resource with diminishing returns for each added token.
What to do about it
- One chat, one task. A new task means a new chat.
- When the model repeats mistakes, forgets constraints you gave earlier or returns to decisions you already closed, ask it for a summary: what is decided, what is open, which constraints apply. Read it, correct it and paste it as the first message of a new chat.
- Put the rules and the most important information at the start of the prompt and repeat the question at the end. A long source document goes in the middle.
- Paste only what the task needs. Every irrelevant paragraph acts as a distractor.
I have no measured length at which a chat becomes too long, and the sources give none. The symptoms in step 2 are the more reliable signal.
Sources
- Nelson F. Liu et al., Lost in the Middle: How Language Models Use Long Contexts (TACL 2024): U-shaped performance by position of information, the drop for GPT-3.5-Turbo.
- Kelly Hong, Anton Troynikov, Jeff Huber (Chroma), Context Rot: How Increasing Input Tokens Impacts LLM Performance (2025): 18 models, reliability falling with input length, effect of distractors.
- Anthropic, Effective context engineering for AI agents (2025): context as a finite resource, summarising and restarting in a new window, notes kept outside the window.
FAQ
Does a larger context window solve the problem?
Not by itself. Liu et al. found that versions with a longer window often scored the same as the standard versions on inputs that fit both, and Chroma reports declining reliability in long-context models too. A larger window raises how much fits, not how well it is used.