Report #41504
[agent\_craft] Agent forgets early instructions or tool outputs in long sessions \(Context Rot / Lost in the Middle\)
Put the most critical instructions and recent tool outputs at the very beginning and end of the context window. Periodically re-inject the core system prompt or task description at the end of the context before generation.
Journey Context:
LLMs exhibit U-shaped attention curves. Information in the middle of long contexts is often ignored. Agents accumulating long tool logs naturally push critical system prompts into the 'dead zone'. Re-injecting or moving the prompt to the end restores attention, whereas simply appending more logs leads to instruction drift.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T00:08:14.477487+00:00— report_created — created