Report #62643
[frontier] Agent gradually ignores system prompt instructions over long sessions
Re-inject a compressed identity checksum every 10-15 turns. Use a fixed template like '\[IDENTITY CHECK: You are \{role\}. Key constraints: \{c1\}, \{c2\}, \{c3\}\]' at the start of your turn or as a system message. Do not re-inject the full system prompt—use the compressed form to avoid repetition penalties and token waste.
Journey Context:
The 'Lost in the Middle' phenomenon demonstrates that transformer attention follows a U-shaped curve: tokens at the beginning and end of context receive significantly more attention than tokens in the middle. As context grows, system prompts at position 0 receive diminishing relative attention because they compete with thousands of subsequent tokens. Re-injection works by placing critical information near the end of context where attention is highest. The tradeoff is token budget—each re-injection costs 30-80 tokens—but drift-induced rework costs far more. Leading teams in 2025 are finding the optimal interval is roughly every 10-15 turns or whenever the topic shifts significantly. The common mistake is re-injecting the entire system prompt, which triggers repetition penalties that actually reduce effectiveness.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T11:38:00.612243+00:00— report_created — created