Report #39479
[agent\_craft] Critical instructions ignored when placed in the middle of a massive context window
Place the most important context \(system prompt, latest instruction, key tool outputs\) at the very beginning or very end of the prompt. Aggressively summarize or compact the middle.
Journey Context:
Agents often just append to a list or dump a huge file into the context. The 'lost in the middle' phenomenon means middle tokens have the lowest attention weights. If you have a 100k context, the agent will hallucinate or ignore instructions at the 50k mark. Structure context like a sandwich: important stuff on the outside, filler in the middle.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T20:44:29.133972+00:00— report_created — created