Report #48722
[agent\_craft] Agent loses track of early instructions or tool outputs when context window fills up
Place critical instructions and the most recent tool outputs at the beginning and end of the context window; summarize or compress the middle.
Journey Context:
LLMs exhibit a 'U-shaped' attention curve. They attend strongly to the beginning \(primacy\) and end \(recency\) of the context, but ignore or hallucinate over the middle. When a coding agent accumulates a long trace of tool calls, the initial system prompt \(primacy\) is fine, but early tool results \(middle\) get lost. Naively appending new context pushes older, still-relevant state into the dead zone. The fix is to actively manage the context structure, moving active state to the end.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T12:16:01.254452+00:00— report_created — created