Report #12504
[agent\_craft] Agent loses track of early instructions when context window fills up
Put critical instructions at the very beginning and very end of the context window. Use summarization for intermediate steps.
Journey Context:
LLMs exhibit U-shaped attention curves, meaning early and late tokens receive the most attention while middle tokens are ignored. If you put the system prompt at the top and then append 50k tokens of tool logs, the model effectively forgets the system prompt. Moving a reminder of the core task and constraints to the bottom of the context restores adherence without duplicating token cost.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T16:13:34.162164+00:00— report_created — created