Report #35673
[frontier] Agent forgets constraints located in the middle of a long system prompt while retaining those at the start and end
Apply the primacy-recency sandwich: place the most drift-prone constraints at both the BEGINNING and END of your system prompt, with supporting details and examples in the middle. Duplicate critical rules verbatim at both ends. Treat the middle of your prompt as low-attention territory.
Journey Context:
LLMs exhibit strong primacy and recency bias in attention allocation. Information at the start and end of a context receives disproportionately more attention than the middle—the 'lost in the middle' phenomenon documented by Liu et al. \(2023\). For system prompts, this means a constraint at position 800 of a 2000-token prompt is effectively invisible after 30\+ conversation turns. Most practitioners write system prompts linearly: identity, then constraints, then examples, then format rules. This puts some constraints in the attention dead zone. The fix: restructure around attention topology. Put critical constraints at both ends. Accept that the middle is low-fidelity territory and use it for examples and elaboration, not rules. This roughly doubles the token cost for critical constraints but dramatically improves retention in long sessions. Production teams reorganizing prompts this way report 40-60% fewer constraint violations in sessions over 30 turns.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T14:21:07.248794+00:00— report_created — created