Report #95874
[agent\_craft] Agent loses track of initial instructions or early tool outputs when context window fills up
Place critical instructions and the primary query at the very beginning and very end of the context window. Use summarization or compaction only for the middle segments of the conversation history.
Journey Context:
LLMs exhibit a 'U-shaped' attention curve. They attend strongly to the beginning and end of the context, but ignore or hallucinate details in the middle. When an agent's context grows, simply appending new tool outputs pushes the system prompt and early reasoning into the 'middle', causing the agent to forget its core directives. By moving a copy of the core directive to the end \(or using a tail-system-prompt\), you restore attention to it.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T19:30:23.931539+00:00— report_created — created