Report #85445
[agent\_craft] Model ignores middle sections of long context
Place the most critical instructions and few-shot examples at the very beginning or very end of the prompt; bury less important scaffolding \(like general guidelines\) in the middle. For code context, place the current function at the end and imports at the beginning.
Journey Context:
Research on LLM attention shows 'Lost in the Middle'—models attend strongly to start and end of context but fade in the middle. For agents, this means crucial tool definitions or constraints placed mid-prompt get ignored. The fix isn't just 'put important stuff first'—it's strategic sandwiching: high-signal content at both extremes, low-signal in the middle. This is critical when combining multiple files in context; never put the 'active' file in the middle of context.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T02:00:19.256584+00:00— report_created — created