When a coding agent starts ignoring earlier instructions, pulling in irrelevant details, or producing weaker answers during a long session, “context rot” is a useful name for the symptom—not a diagnosis. In Fikayo Adepoju’s article, five types describe possible failure modes: lost in the middle, attention dilution, distractor amplification, repetition bias, and cost and latency compounding. This is Adepoju’s explanatory framework, not a scientific standard; its fifth item is an operational burden rather than reasoning degradation.
What “context rot” means in harness engineering
A harness is the surrounding system that supplies an agent with instructions, conversation history, retrieved material, tool results, and any summaries or memory. In a long session, an agent may appear to forget earlier turns or use context poorly. But that symptom can have several causes: the needed text may not have been sent, may have been truncated or summarized away, may not have been retrieved, or may have been present but used ineffectively.
As an Amazon Associate I earn from qualifying purchases.
Context-length effects and position effects are related, but distinct. Length effects concern how performance changes as the total input grows. Position effects concern whether the same relevant information is easier to use in one part of a long input than another. Neither is captured by a single universally accepted five-part classification.
Do these 3 things before closing this tab:
1Fix the driver behind crashes, sound loss and screen glitches2Clear out junk files and repair common Windows errors3Scan for outdated or missing drivers - takes under a minuteThe five types in Adepoju’s framework
1. Lost in the middle
This is a position effect: an important instruction or fact sits between other material and is harder for the model to use. In the 2023 study “Lost in the Middle: How Language Models Use Long Contexts,” Nelson F. Liu and coauthors found that performance in the studied long-context tasks was often strongest when relevant information appeared near the beginning or end, and significantly worse when it appeared in the middle. That does not mean models invariably ignore the middle; it means placement can matter, even for models built to accept long inputs.
#1 Best Overall
2. Attention dilution
Adepoju uses this label for the risk that load-bearing instructions compete with a growing mass of context. It is a plausible explanation for why an agent may seem to stop following an earlier constraint, but it should not be mistaken for a measured, fixed “attention budget” or a settled causal mechanism. Chroma’s 2025 technical report observes performance changes as input length varies, while noting that the mechanisms are not definitively explained.
3. Distractor amplification
Irrelevant but plausible details can pull an answer away from the current task. Adepoju describes this as distractor amplification. Chroma’s experiments include distractors and report model-specific patterns, not a rule that every irrelevant detail harms every model or task. For a harness engineer, the practical question is whether distractors in the actual workload measurably change task performance.
4. Repetition bias
Repeated snippets may look like corroboration even when they all come from the same original source. Adepoju’s label points to the risk that duplicated information gains undue influence. Chroma examines context structure and repeated-word behavior, but the available findings do not establish that repeated facts are always treated as more certain. Preserve provenance and test whether duplicates affect the target system.
Rank #2
5. Cost and latency compounding
Adepoju includes the growing operational burden of large inputs: they consume more of the available token capacity and can increase the work required to process a request. This belongs in harness planning, but it is not “rot” in the same sense as degraded use of information. The article’s specific cost multiple is not established here, so no general numerical estimate is warranted.
What the primary evidence establishes
Chroma’s report, “Context Rot: How Increasing Input Tokens Impacts LLM Performance,” by Kelly Hong, Anton Troynikov, and Jeff Huber, evaluated 18 LLMs in 2025. The authors held task complexity constant while varying input length and reported that performance was not uniform as length changed, including on simple tasks. They caution that the evaluation does not cover every real-world use case and does not definitively explain why performance changes.
“We observe that model performance varies significantly as input length changes, even on simple tasks.”
The Liu et al. study is narrower: it investigates where relevant information appears within long contexts, rather than treating length and position as the same variable. Together, these findings support testing both how much context is sent and where key material appears. They do not validate a universal five-type taxonomy.
How to diagnose an agent that seems to forget
- Inspect the actual request payload. Confirm whether the earlier instruction or fact reached the model at all. Check for truncation, summary loss, failed retrieval, or a mismatch between the stored conversation and the request actually sent.
- Make the suspected failure reproducible. Replay a representative trace and vary one factor at a time: total input length, location of key information, distractor material, or duplicated snippets. Hold task and relevant content constant when testing position.
- Compare outputs against task-specific criteria. Record whether the agent followed constraints, retrieved the right details, and completed the task. A changed answer alone does not identify the cause.
- Test a mitigation on the same traces. Compare what information each version retains or discards, retrieval accuracy and provenance, placement in context, robustness to distractors and duplicates, token and latency cost, and observed task performance.
Moda’s operational guidance recommends building regression evaluations from observed failures and replaying representative traces. Moda is a vendor, so treat this as practical guidance to validate in your own workload, not as a universal guarantee.
Harness changes worth evaluating
Retrieve relevant history instead of appending everything
Keep active context focused on the current task and retrieve older information when needed. This may reduce irrelevant material, but retrieval can omit or misidentify a detail; evaluate accuracy and preserve source identifiers so the agent can recover the underlying information.
Compact completed work into state, not a vague recap
When a long-running task spans context windows, summarize decisions, constraints, current status, and unresolved questions. Compaction can discard a detail that later proves important, so test summaries against representative traces. Anthropic’s engineering guidance for long-running agents describes compaction alongside incremental work setup, progress summaries, and end-to-end verification. It is reported engineering experience, not a controlled comparison of the five failure modes.
Trim tool results to what the next step needs
Keep fields used by the next action and retain identifiers for looking up full results later. Moda recommends this approach; whether it improves a particular harness depends on the data and retrieval path.
Deduplicate without erasing provenance
Where repeated snippets are accidental duplicates, remove them or mark them as repeats while retaining their source. Multiple copies of one claim should not be presented as independent corroboration. Verify that deduplication does not remove genuinely distinct evidence.
Test key information near prompt edges
For a suspected lost-in-the-middle failure, compare otherwise equivalent prompts with the key instruction or fact in different positions. Re-ranking can help in some tasks, but position should be treated as an evaluation variable rather than a guaranteed fix.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Does a bigger context window fix context rot?
A larger window lets a request contain more tokens; it does not establish that every included detail will be used reliably. Chroma’s findings show that performance can vary as input length changes, and Liu et al. show that information position can matter in long contexts. A larger window may help avoid excluding useful history, but it can also make it easier to send unnecessary context. Decide with representative evaluations, not the window limit alone.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




