Report #48171
[frontier] Agent forgets system prompt constraints after 20\+ turns in a long session
Use the bookend pattern: place critical identity constraints at both the beginning AND end of the system prompt. For sessions exceeding ~15 turns, use prompt caching to re-inject a condensed constraint block as a mid-conversation system message, creating an artificial 'new beginning' that resets the attention curve.
Journey Context:
The 'Lost in the Middle' phenomenon means information in the middle of long contexts receives significantly less attention weight. Your system prompt at turn 0 becomes 'middle content' by turn 30. Teams that only front-load constraints see steady drift after the midpoint. The counterintuitive fix is duplication: critical constraints must appear near the generation point, not just at the context start. Prompt caching \(Anthropic, OpenAI\) makes this efficient—you cache the constraint block once and append it to turns without re-processing. The tradeoff is slight context overhead, but the identity stability gain is disproportionate. Leading teams in 2025 are treating constraint placement as a spatial problem, not just a content problem.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T11:20:02.150525+00:00— report_created — created