Report #79089
[agent\_craft] Agent forgets instructions or early context in long sessions \(Lost in the Middle\)
Place critical instructions \(system prompt, tool schemas\) at the very beginning and very end of the context window. For retrieved documents, put the most relevant at the start and end, not the middle.
Journey Context:
LLMs exhibit U-shaped attention patterns. They attend strongly to the beginning and end of the context, but performance degrades for information in the middle. Putting crucial state or retrieved context in the middle leads to hallucinations or ignored instructions, even in large context windows.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T15:21:03.266196+00:00— report_created — created