Report #82163
[counterintuitive] More codebase context always improves AI coding agent output quality
Curate context ruthlessly. Place critical instructions and key code at the START and END of your prompt. Use targeted retrieval to select 5-10 most relevant files rather than dumping entire directories. If the AI seems to ignore information you provided, check if it's buried in the middle of a long context.
Journey Context:
LLMs exhibit a 'U-shaped' attention curve: they reliably use information at the beginning and end of their context window but degrade significantly on information in the middle. Adding more context can actively HURT performance by pushing critical details into this 'lost middle' zone. The developer intuition of 'more context = better decisions' \(true for humans up to working memory limits\) is inverted for LLMs. The failure is insidious: the AI still produces confident, fluent output—it just doesn't incorporate the information it ignored. A model with 10 carefully selected files often outperforms the same model given 100 files.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T20:30:16.258868+00:00— report_created — created