Report #92494
[frontier] Agent ignores system instructions buried in the middle of a long context window
Move the most critical session constraints from the initial system prompt to a dynamically injected block immediately preceding the agent's generation step, or use RAG to retrieve rules only when relevant.
Journey Context:
The 'Lost in the Middle' phenomenon means that as context grows, instructions placed at the beginning and middle are ignored in favor of recent user messages. Developers assume a 128k context means the agent 'sees' everything equally. The frontier practice is 'Context Sandwiching': placing identity at the top, data in the middle, and strict constraints at the very bottom, just before the assistant's turn, guaranteeing maximum attention weights on the rules.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T13:50:28.384859+00:00— report_created — created