Report #102063
[research] I stuffed my whole repo into the context but the agent misses facts in the middle.
Place the most relevant context near the beginning or end of the prompt; avoid burying critical instructions or files in the middle. For very long contexts, combine RAG with a ranked file list so the model sees the top hits early, and use explicit citations/line numbers in retrieved snippets.
Journey Context:
The 'lost in the middle' effect shows performance degrades 10-20\+ points when relevant information sits in the middle of a long prompt, even for models with huge context windows, because attention has primacy and recency biases. Developers often assume longer context equals better recall, but strategic ordering, chunking, and reranking matter more than raw context size. If you must use full context, put the task description and key files first, supporting evidence last, and keep the middle for lower-priority material.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-07-08T04:54:38.082910+00:00— report_created — created