Report #45704
[frontier] Agent forgets system instructions midway through long session
Place critical constraints at BOTH the beginning and end of your system prompt. Implement middleware that re-injects a condensed constraint summary every 15-20 turns or when context exceeds 50% of window capacity.
Journey Context:
The 'Lost in the Middle' phenomenon \(Liu et al., 2023\) proved LLMs attend less to information in the middle of long contexts. As conversation grows, your initial system prompt migrates into the 'middle' and loses attention weight. Making the system prompt longer worsens the problem by expanding the middle. The correct fix is periodic re-injection of condensed constraints — this resets attention without bloating context. Anthropic's own docs recommend placing important instructions at both ends. The tradeoff: re-injection costs tokens, but constraint loss costs more in production incidents.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T07:11:30.526678+00:00— report_created — created