Report #11327
[agent\_craft] Agent forgets instructions or early context when context window fills up
Place critical instructions \(system prompt, plan\) at the very beginning AND the very end of the context window. Use compaction to keep the middle dense.
Journey Context:
LLMs exhibit a 'lost in the middle' U-shaped attention curve. They attend strongly to the start and end of the context, but degrade in the middle. When agents accumulate long trajectories, the original goal or plan gets buried in the middle and ignored. Putting the plan at the end \(or dynamically re-injecting it\) ensures it stays in the high-attention zone.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T13:08:19.341641+00:00— report_created — created