Research

We Went Looking for Context Rot at 700,000 Tokens

Report

Context rot is the claim that a model gets worse at recall as its window fills, on the same task, purely because there is more text sitting around the answer. We spent three versions of an experiment trying to catch Claude Sonnet 5 doing it. The first two found nothing at all. The third found 5.6 points.

Two caveats frame everything below, and both are load bearing. Every run went through the Claude Code CLI, which prepends a system prompt and a full set of tool definitions to every request. That overhead measured a steady 29,000 tokens or so across all 128 runs, so our smallest cell is really 33,766 measured input tokens rather than the 5,000 we asked for. And the 700,000 token cell is eight runs. Its 95 percent Wilson interval runs from 60.6 to 99.5 percent, which is exploratory by any honest reading, not a powered result.

Short answer

Context rot means recall degrading as the context window fills, on a task whose difficulty never changes. Across 128 trials against Claude Sonnet 5, accuracy fell from 100 percent at 34,000 measured input tokens to 94.4 percent at 730,000. That clears the 85 percent effective-length bar which every model in the NoLiMa paper failed by 32,000 tokens. The 700,000 cell is eight runs, so read it as a direction and not a measurement.

Chalk illustration of a very long unrolled scroll stretching into the distance, with a single figure standing at one end holding a lantern over a small marked passage far down its length
Two facts, planted in opposite halves of a 730,000 token window. The failure was never finding one of them.

What is context rot, exactly?

Context rot is recall degrading as the context window fills, measured on a task whose difficulty is held constant. It is not the model running out of room, and it is not your instruction file being too long. The mechanism under it is attention spreading thinner across more tokens.

The term gets used two ways and the difference matters. One usage describes instruction files bloating until the important rules sit in the middle where models attend worst, which is a document design problem with a document design fix. The other, which is the one Chroma's report and the NoLiMa paper measure and the one this study tests, is narrower: hold the task identical, add filler around the answer, and watch accuracy fall. Our note on context engineering uses the first sense. This page uses the second.

The proposed mechanism is unglamorous. Attention is a softmax over every token in the window, and the mass sums to one no matter how many tokens there are. Its entropy grows roughly with the log of the count, so attention flattens toward uniform as context grows. An exact string match still produces a sharp spike that survives that flattening. A weak semantic association does not.

Why did our first two attempts find nothing?

Both early versions planted a key and then asked for it by name. Exact string matching produces a sharp attention spike that survives dilution, so the model scored 1,251 out of 1,251 keys correct through 700,000 tokens. That result measured the one retrieval mode immune to the mechanism we were hunting.

A perfect score is not evidence that long context is fine. It is evidence that the instrument was pointed at the wrong thing. Version two returned 100 percent at every length, every depth decile, and zero decoy grabs, which is exactly what the softmax argument predicts for literal matching. The null was correct and uninformative at the same time.

The risk at that point is obvious: keep tuning until something finally breaks, then publish the break. So we wrote the version three design down first, in a pre-registration file committed before any version three run, with the thresholds copied from published work rather than chosen after seeing our own numbers. Two of them did the heavy lifting. Difficulty had to calibrate into a 90 to 95 percent band at the short control length, because at 100 percent a null is indistinguishable from a saturated instrument. And degradation was defined as the short-to-long gap on an identical task, never an absolute score, so a harder question could not masquerade as context rot.

How do you build a probe that context rot can actually fail?

Remove every lexical handle. One arm states a platform ceiling in one half of the window and this service's fraction of it in the other half, never writing the number anywhere. The other arm plants two fields per service in separate files and asks a question that filters on one and selects on the other.

Both arms share a shape. The prompt is a long session log of files supposedly read earlier, the planted material is scattered at controlled depths, and the reply is bound to a strict one-line-per-answer output contract so grading never depends on parsing prose.

What did 128 runs at up to 730,000 tokens show?

The latent arm held at 100 percent through 34,000 tokens and 99.3 percent at 80,000, then dropped to 94.4 percent at 730,000. The join arm held at 99.2 percent at both lengths it ran. Against NoLiMa's 85 percent retention bar, effective length is at least 700,000 tokens.

ArmMeasured input tokensInstancesKeys correctWilson 95%
Latent, two hops33,76630270 / 270 (100.0%)88.6 to 100
Latent, two hops80,13230268 / 270 (99.3%)87.4 to 100
Latent, two hops730,577868 / 72 (94.4%)60.6 to 99.5
Cross-window join44,01330119 / 120 (99.2%)87.2 to 100
Cross-window join89,96530119 / 120 (99.2%)87.2 to 100
Source: Claude Sonnet 5 via the Claude Code CLI, 128 scored runs, $83.36 list-price equivalent. Input tokens are medians of measured values, not targets.

The intervals are computed on instances rather than on keys, and that choice costs a lot of apparent precision. Nine keys inside one run share a prompt and a haystack, so they are clustered observations, not independent ones. Version two's 180 key-observations per length were effectively 20, not 180. Counting instances is why a 270 out of 270 result still carries a lower bound of 88.6 percent.

For scale: NoLiMa tested twelve models on a similar latent-association task, and ten of them had fallen below half their short-context baseline by 32,000 tokens. GPT-4.1 posted an effective length of 16,000 against a claimed one million. No Claude model appeared in those tables and nothing in that paper ran past 128,000. A year later, on our version of that task, retention at 730,000 tokens is 94.4 percent.

Why is the smallest context in this study 34,000 tokens?

Because the Claude Code context window is never empty. The CLI ships a system prompt and a full set of tool definitions with every request, and that overhead measured a steady 29,000 tokens across all 128 runs. Our nominal 5,000 token cell is already past the point where most models in the NoLiMa tables had collapsed.

This is the caveat that changes how the whole table reads. We asked for 5,000 tokens of context and measured 33,766. We asked for 50,000 and measured 80,132. The gap is flat, which is what makes it diagnosable as fixed harness overhead rather than anything about the task. It also means our control length is not a short-context baseline in the NoLiMa sense at all. It sits past their 32,000 token column, the column where most of their models had already lost half their accuracy.

The practical version of this: if you run agents through a CLI or an SDK with tools attached, your usable window is smaller than the number on the box, and every request pays that toll before your content arrives. It is worth measuring rather than assuming, and it is a real input to any token budget you write down.

What does a failure at 700,000 tokens actually look like?

Every one of the six latent misses returned the platform base quantity with the service fraction never applied. The model found the shallow half of the pair and stopped. Not one miss across 128 runs grabbed a superseded decoy value, and not one join question ignored its filter.

That is a specific and fairly encouraging failure shape. The model is not confusing itself with stale information, and it is not losing track of the answer's location. It retrieves the first fact, then does not carry it to the second one. Hop one lands and hop two does not. The four misses at 730,000 sit at planted depths of 0.55 to 0.75, inside the same range as the correct answers, so with four data points there is no depth signal to read and we are not going to invent one.

One bookkeeping note, because it changed the scorer. The two misses at 80,000 tokens were originally filed as "other" for the simple reason that no category existed for this failure yet. Both had returned 1,024 for queue_depth, the untouched platform anchor. A miss category that does not exist looks identical to a miss that did not happen, so we added the category and now an assertion at import checks the anchor prose against the anchor numbers, because a desync there would make the new label silently stop matching rather than crash.

Does this refute the 100,000 token dumb zone?

No, and it is not the same claim. Matt Pocock's dumb zone describes a working session degrading as it accumulates its own noise, judged on instruction following and decision quality. This study holds one task fixed and fills the window with inert filler. Different lens, different failure mode.

Pocock's own dictionary states the claim more carefully than the repetitions of it do: early in a session the agent is in a "smart zone", sharp and focused, and as the session grows it drifts into a dumb zone, sloppier, forgetful, more mistakes. Same model, same harness, just more context. It puts the onset around 125K to 150K tokens and adds that this is debated. That hedge is worth preserving. Writing up his own runs against a one million token window he was blunter: "Don't treat 1M context window any differently. It's still 100K of smart, and 900K of dumb." He credits the phrase itself to Dex Horthy.

A working session has three things our prompt does not. It accumulates tool results nobody cleared. It carries failed attempts and abandoned plans nobody swept up. And it feeds the model's own earlier output back in as input. Our haystack is inert: filler written once, never touched, with a fixed question asked cold at the end. That gap is the whole difference between the two experiments, and it is wider than the matching token counts make it look. His own illustration is a session rather than a prompt: an agent stuck on one problem for an hour somewhere around 150K to 200K tokens, which solved it quickly once the context was cleared. Nothing in our design can produce that story, because nothing in our design accumulates.

So the two results sit on different axes rather than in opposition. Where they touch is recall, since the smart zone is described partly as recall being good early, and our data says recall survives to 730,000 tokens in a static prompt. Where they do not touch is most of what the claim is actually about. We never scored instruction adherence and never let a session generate its own noise. Our only failures landed one step past plain retrieval, where two separated facts have to be held together, which suggests composition breaks first.

The experiment that would actually test the dumb zone is the one we have not run: hold a task fixed, grow a real session around it with genuine tool output and genuine dead ends, and score instruction adherence instead of recall. Until someone runs it, read this post as evidence about long prompts and not about long sessions.

What should you change about how you use long context?

Less than the alarm suggests and more than the marketing does, on recall and composition in a fixed task. It says nothing about a long working session. Recall out to 700,000 tokens is good enough that reflexive compaction probably costs more than it saves. What degrades first is composition.

The honest summary is that we set out to find context rot, built a probe specifically designed to expose it, spent $83.36 finding out, and got 5.6 points at the far end of a window most tooling will not let you fill. The pre-registration says both outcomes were publishable before we knew which one we had. This is the one we got. The runner, the pre-registration, and every result row are in the repo, and the eight-run cell at 700,000 tokens is the first thing we would spend more on.

Common Questions

What is context rot in an LLM?
It is recall getting worse as the context window fills, on a task whose difficulty stays the same. The usual explanation is that attention is a softmax over every token in the window, so the same fixed amount of attention mass spreads across more and more text. Exact string matches survive that spreading. Weak semantic associations do not. It is a different problem from running out of context, and a different problem from a bloated instruction file.
Does Claude Sonnet 5 suffer from context rot?
Measurably, but not much, on the tasks we ran. Accuracy on a two-hop latent-association task went from 100 percent at 34,000 measured input tokens to 99.3 percent at 80,000 to 94.4 percent at 730,000. That is 5.6 points of degradation across a 22-fold increase in context. By NoLiMa's definition, which sets effective length at the longest context retaining 85 percent of the short-context score, effective length here is at least 700,000 tokens.
How big is the Claude Code context window in practice?
Smaller than the advertised number, by a fixed amount you can measure. Across all 128 of our runs the CLI added roughly 29,000 tokens of system prompt and tool definitions before any of our content arrived. We asked for a 5,000 token context and measured 33,766. Any budget you write for an agent running through a CLI or an SDK with tools attached should subtract that overhead first rather than assume the window starts empty.
Is a one million token context window actually usable?
On this evidence, more usable than the 2025 literature would predict, with one caveat. The failure mode we found is not losing a fact. It is finding one fact and never carrying it to a second fact planted elsewhere in the window. So a million tokens of reference material you will query one item at a time looks fine. A million tokens where the answer requires joining two distant pieces is where the degradation showed up first.
Why did you only run eight trials at 700,000 tokens?
Cost. A single run at that length is about $4.06 in list-price terms, so the eight-run cell was $35.22 on its own, against $83.36 for the entire version three experiment including calibration. Eight runs is enough to see a direction and not enough to size it. The 95 percent Wilson interval on that cell spans 60.6 to 99.5 percent, so we describe it as exploratory rather than as a result.
Does this mean Matt Pocock's dumb zone is wrong?
No, and it is not the same claim. The dumb zone describes a working session degrading as it fills with its own noise, accumulated tool results, failed attempts and abandoned plans, and it is judged on instruction following and decision quality. His dictionary puts the onset around 125K to 150K tokens and notes that the number is debated. This study holds one task fixed, surrounds it with inert filler, and scores recall and composition. Recall survived to 730,000 tokens. That is a narrow result on one axis, and a narrow result about prompts does not refute a claim about sessions.
How is context rot different from an agent running out of context?
Running out is a hard limit with a visible error or a forced compaction. Context rot is silent. The request succeeds, the format is correct, and the answer is confidently wrong. In our data every single run returned a perfectly formatted reply on the first attempt with zero API errors, including the ones that got an answer wrong. Nothing about the response signals which category it is in.
Should I stop compacting my agent sessions?
Not automatically, but stop treating compaction as free insurance. If your reason for compacting is recall degradation, this data suggests the fear is priced too high for the lengths most sessions actually reach. If your reason is latency or spend, that argument is untouched by anything here, because attention cost scales quadratically with length and that is an economics question rather than a quality one.

Sources

SourcePublisherLink
NoLiMa: Long-Context Evaluation Beyond Literal MatchingModarressi et al., ICML 2025 (arXiv)arxiv.org
Context Rot: How Increasing Input Tokens Impacts LLM PerformanceChroma Research, 2025research.trychroma.com
Scalable-Softmax Is Superior for AttentionNakanishi, arXiv 2025arxiv.org
Long-Context Generalization with Sparse AttentionNunes et al., arXiv 2025arxiv.org
Untie the Knots: An Efficient Data Augmentation Strategy for Long-Context Pre-TrainingTian et al., arXiv 2024arxiv.org
Effective Context Engineering for AI AgentsAnthropic, 2025www.anthropic.com
Dictionary of AI Coding, "Smart zone" and "Attention degradation" entriesPocock, GitHub 2026github.com
Experiments pushing coding sessions past 100K tokens in a 1M context windowPocock on X, 19 March 2026x.com
Full Walkthrough: Workflow for AI Coding (smart and dumb zones at 7:29 and 1:53:42)Pocock, YouTube 2026www.youtube.com
Context-rot v3: pre-registration, runner, and raw resultsGriffith, GitHub 2026github.com

Questions to explore next

Keep Exploring

Chalk stick figure in a hard hat presenting a little machine of blue gears it just built

Bring us the bottleneck.
We’ll build the system.

No Dreaming. Just Building.