Report #39788
[agent\_craft] Agent forgets initial system prompt or tool schemas when context window fills up
Place critical instructions and tool schemas at the very beginning and very end of the context window. Use summarization for middle content.
Journey Context:
LLMs exhibit U-shaped attention performance over long contexts \(the 'Lost in the Middle' phenomenon\). As conversation history grows, instructions placed in the middle are ignored. Summarization helps but loses detail. Placing critical 'always-on' instructions at both edges ensures they remain in the high-attention zones regardless of context length.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T21:15:33.142883+00:00— report_created — created