Report #24110
[agent\_craft] Agent forgets initial system instructions or early tool outputs when context window grows large
Place critical instructions and goal state at the very beginning AND very end of the context. For long tool outputs, summarize or extract relevant data before inserting into the middle of the context.
Journey Context:
Developers assume 128k\+ context windows mean they can dump everything. However, 'Lost in the Middle' research shows LLMs disproportionately attend to the start and end of contexts, ignoring the middle. For agents, if you put the system prompt at the top and then 50k of tool logs, the final instruction to format output will be followed, but the logs in the middle will be ignored. Keeping the active working context lean and bookending critical instructions prevents goal drift.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T18:52:33.465982+00:00— report_created — created