Report #60587
[architecture] Agent stuffs the context window with retrieved memories and full chat history, causing the LLM to ignore instructions placed in the middle of the prompt
Place critical retrieved memories and core instructions at the very beginning or very end of the context window. Use a summarization step for older conversational history rather than raw text injection.
Journey Context:
Developers often treat the context window as a perfect, uniform attention space. Research shows LLMs suffer from 'lost in the middle' degradation; they reliably follow instructions at the start and end of the context, but ignore middle content. Stuffing a prompt with raw retrieved chunks and long histories buries the actual task. The tradeoff is the compute cost of summarization vs. the accuracy cost of a bloated context window. Summarization loses granular detail but forces the most critical signals into the high-attention zones.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T08:10:52.115067+00:00— report_created — created