The context window: why long chats get worse, and what actually fills it
Nothing about the model changes at message two hundred. What changed is what it can still see. I build Settl, an expense-splitting app, solo with Claude, and I blamed the model for weeks before I understood that a long thread is a shrinking view, not a tired brain.
The budget is fixed and you pay it every turn
The model holds nothing between turns. Every time you hit enter, the client re-sends the whole transcript: your first message, every reply, every file you pasted, every tool result. It reads all of it from scratch and produces one more message.
That transcript is measured in tokens, not messages, and the cap is hard:
English prose ~4 chars/token 1,000 tokens ~= 750 words
Code ~3 chars/token punctuation and camelCase both split
1,000-line TS file 10,000-15,000 tokens
one stack trace 500-2,000 tokens
one full test run 2,000+ tokens, mostly passing lines
A chat where you pasted four files and two test runs is past 60,000 tokens while fitting on one scroll of your screen. Message count is a terrible proxy. Bytes are the unit.
What happens when the budget runs out
Three different things happen, and from your chair they look identical:
- Truncation. The oldest turns are dropped. Your message three stops being sent.
- Compaction. The tool swaps old turns for a generated summary. Summaries keep conclusions and
drop constraints, because a constraint reads like a detail. "We chose Postgres" survives. "The
table is
orders, plural, because the singular collides with a reserved word" does not. - A hard error. Raw API calls just refuse once you cross the limit.
None of them tells you which fact went missing. The loss is silent and selective, and you keep talking as though the model still has the thing.
Why the middle goes soft first
Even inside the window, position matters. Attention is a weighted average across every token in context, so adding tokens drops the weight available to any one line. A rule you stated once at message three now competes with fifty thousand tokens of noise.
Measured retrieval accuracy across a long context is a U-shape: high at the start, high at the end, sagging in the middle. A fact parked in that sag can be fully inside the window and still functionally invisible. "In the context" is not the same as "in effect".
Why correcting makes it worse
Watch the loop. It writes order. You say "no, it is orders". It apologises and writes orders.
You paste an error. It writes order again.
Each correction appends tokens, pushing your original statement deeper into the sag. Worse, the transcript now holds the wrong version several times, in your quotes and in its own replies. You raised the frequency of the wrong sequence while trying to remove it. Contradictions in a transcript do not cancel, they average.
The move that works is not another correction. It is re-anchoring at the end, where attention is strongest:
Before writing anything, restate the current state of this project:
- the exact table and column names
- the decisions we have locked, one line each
- the files in scope, with paths
Use only this conversation as your source. Write UNSURE rather than guess.
If it gets that list wrong, the thread is finished. Stop correcting and reset.
What is actually eating your window
- Whole files pasted for one function. Paste the function, or a path and line range.
- Full test output. You need the failures, not 300 lines of passing dots.
- Tool results you already acted on. An hour-old directory listing is dead weight, re-sent on every turn.
- The branch you explored and abandoned. Free to write, expensive forever after.
The reset, and what to carry across
Three hundred good words at the top of an empty context sit in the strongest attention position you have. That beats a long thread, reliably.
Write a handoff brief for a fresh session, under 400 words:
- exact schema names and types
- decisions locked, one-line reason each
- files in scope, with paths
- what is done, what is next
- approaches we tried and rejected, and why
Write it for someone who has never seen this conversation. No narrative.
For the durable version, session logs committed to the repo so every session starts warm, see
settl.fyi/social/tip-fresh-sessions. This page is the mechanism, that one is the habit.
Big window versus fresh session
- Big window for reading. One pass over a large codebase, one question, one answer. Everything in context is relevant to what you are asking.
- Fresh session for building. Iterative work accumulates reversals, and reversals are what averages badly.
- The rule: the window is for loading, not accumulating. Once context is mostly history rather than material, its value has flipped sign.
Run this on your codebase
Paste this into any thread that has started to drift:
Before we continue, audit this conversation's own state.
1. List every fact about my project you are currently relying on: schema
names, file paths, framework versions, decisions we locked.
2. Mark each HIGH or LOW confidence, and name the message you got it from.
3. List anything I have corrected you on more than once.
4. List anything now obsolete: plans we abandoned, code we replaced,
assumptions we reversed.
Change no code. Then write me a brief under 400 words holding only the
HIGH-confidence facts and live decisions, which I can paste as the first
message of a fresh session.