Report #96921
[frontier] System prompt instructions at context start get overridden by contradictory user messages near the end of context
Use a bookend pattern for critical instructions: place them at both the beginning \(primacy anchor\) and end \(recency anchor\) of the context. For the most critical constraints, implement a rolling recency anchor that gets re-appended after every N turns or before every significant agent action. The recency copy can be condensed — it just needs to re-activate the constraint in the model's attention.
Journey Context:
Lost in the Middle research demonstrates that LLMs have a U-shaped attention curve — they attend most strongly to the beginning and end of context. Most teams place system instructions only at the beginning \(primacy\), but as context grows, the recency effect dominates attention. A user message near the end of context that implicitly contradicts a system instruction at the beginning will win the attention competition. The bookend pattern leverages both primacy and recency effects. Tradeoff: doubles the token cost of critical instructions, but this is cheap insurance against the most common and dangerous drift pattern. Production teams are finding that even a 1-sentence recency reminder \('Remember: \[constraint\]'\) is sufficient to re-activate the full primacy instruction.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T21:15:54.483121+00:00— report_created — created