The Working Set of a Coding Agent: Coherence Debt in Repository-Scale Tasks
| Source: arXiv AI
Tags: coding agents, context window, SWE-bench, LLM hallucination, agent harness, multi-model benchmarking
Researchers introduce 'coherence debt' to explain why coding agents fail on repo-scale tasks: when required facts aren't in context or parametric memory, agents fabricate rather than stop, producing wrong code. Tested across 7 models and 5 harnesses, configurations varied 10x in token consumption with no quality gain from spending more.
Details
This paper from Mohammadi et al. (Aug 17, 2026) formalizes a key failure mode in repo-scale coding agents: 'coherence debt,' the gap between facts an edit requires and what is available via context or model memory. Rather than blocking on missing information, agents confidently fabricate values — meaning error-detection tools that look for missing files find holes already filled with wrong content. Across 7 models and 5 harness configurations, availability of facts determines success, not proximity. A fact supplied far from the edit works as well as one placed next to it. Configurations that all pass tests differ more than tenfold in token consumption, because harnesses differ in how often they rebuild the same context from scratch — and spending more tokens on an already-missing fact recovers nothing. One striking finding: when a library API changes, all 7 models fail at exactly the same location, suggesting reliance on parametric memory (training data) rather than reading context. On SWE-bench — where models likely know the repos from training — reads no longer predict success, supporting this interpretation. Practical implication: harnesses should keep facts an edit depends on available when the agent writes, and verify availability against what the agent produces rather than what it reads.