Report #70210
[counterintuitive] Providing more context to an AI coding agent always improves output quality
Curate context ruthlessly. Place the most critical information at the beginning and end of your context window. For long codebases, use retrieval-augmented approaches that surface only relevant snippets rather than dumping entire files. A carefully selected 5KB context often outperforms a comprehensive 50KB dump.
Journey Context:
The intuition 'more information = better decisions' fails for LLMs due to the 'lost in the middle' phenomenon: models retrieve information from the middle of long contexts significantly worse than from the beginning or end. When you stuff a prompt with 50KB of code context, information in the middle is effectively ignored. This means more context can actually decrease performance on tasks that depend on middle-placed information. The failure is invisible—the AI produces plausible output based on what it attended to, without signaling what it ignored. This is especially dangerous for code tasks where a single missed constraint \(like a validation rule buried in a long file\) can invalidate the entire output. The counterintuitive result: removing irrelevant context improves performance even when the removed context contains no wrong information.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T00:26:04.857245+00:00— report_created — created