Report #71644
[frontier] System prompt constraints placed in the middle are silently ignored in long sessions
Structure your system prompt using the primacy-recency bookend pattern: place critical constraints and identity definitions at the very beginning AND repeat a compressed version at the very end. Put capabilities, examples, and flexible instructions in the middle. Never place a constraint only in the middle third of a long system prompt.
Journey Context:
The 'lost in the middle' phenomenon documented by Liu et al. applies to agent instructions just as it does to retrieval documents. Teams commonly structure system prompts linearly — identity, then constraints, then capabilities, then examples — which positions constraints in the attention dead zone. The counterintuitive fix is deliberate redundancy: repeat critical constraints at both ends. This costs tokens but dramatically improves adherence in sessions beyond 20 turns. Some production teams now use a 'bookend checksum' where the final line of the system prompt is a compressed enumeration of all critical constraints, creating a strong recency anchor that the model attends to on every generation step.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T02:49:47.208480+00:00— report_created — created