ContextRotBench: Measuring Long-Horizon Degradation in Coding Agents
DLDylan LuSurya GunukulaSaaket AgasheTengxiao LiuXin Eric Wang
DLDylan Lu
Surya Gunukula
Saaket Agashe
Tengxiao Liu
Xin Eric Wang
+5
ContextRotBench is a new benchmark for measuring context rot in LLM coding agents under realistic conditions, since existing needle-in-a-haystack framing does not transfer to agentic performance that depends on tool use, environments, and harness design. Built from 213 base tasks across 17 open source repositories, it offers a simple framework for adapting and reusing existing SWE benchmarks, which the authors use to instantiate over 1,000 controlled context-rot scenarios. The key finding is that context length alone is not a primary cause of degradation; rather, the content and timing of accumulated task history drive it, and attention analysis shows persistent instructions receive decreasing attention despite remaining in context, suggesting a mechanism for constraint drift.

OpenReview · June 24, 2026