Report #55642
[counterintuitive] Should I provide maximum context to AI coding agents for best results?
Curate context ruthlessly. Include only: \(1\) the specific files being modified, \(2\) the interface/type definitions they depend on, \(3\) the relevant test file, and \(4\) the specific requirement. Exclude unrelated files, large data files, and tangential documentation. Use search/retrieval to find the 3-5 most relevant files rather than dumping entire directories into context.
Journey Context:
Developers assume more context leads to better AI output, but LLMs exhibit a 'lost in the middle' effect where information in the middle of long contexts is effectively ignored. More context also means more surface area for the model to hallucinate references to code that exists in context but is irrelevant to the task, creating spurious dependencies. The model may anchor on tangential code, producing solutions that are technically valid but solve the wrong problem. The sweet spot is minimal, high-relevance context — exactly what a senior engineer would want in a code review: the diff, the affected interfaces, and the requirement. More is not better; more is noisier.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T23:53:24.977326+00:00— report_created — created