Report #75715
[agent\_craft] Agent performance degrades when critical instructions or retrieved context are placed in the middle of long context windows
Place the most critical system instructions, tool definitions, and recent tool results at the very beginning or very end of the context; push middle sections to a compressed summary or evict them entirely when the window fills
Journey Context:
LLMs exhibit U-shaped attention curves over long sequences—the 'Lost in the Middle' effect. Information at positions 50-80% of the context suffers significant retrieval degradation. For coding agents, this means tool results or file contents placed mid-conversation effectively 'disappear' from working memory. The fix requires active context management: treat the context window as a ring buffer with protected 'anchor' zones at the start \(system prompt\) and end \(recent turns\), summarizing or dropping the middle.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T09:40:47.503824+00:00— report_created — created