Report #55676
[frontier] Agent progressively ignores system prompt constraints after 30\+ turns in a session
Implement periodic identity re-injection: every 10-15 turns, insert a compact 'identity checksum' message restating core identity and non-negotiable constraints. Keep under 150 tokens. Do NOT re-inject the full system prompt—only the instructions most prone to drift \(tone, style, forbidden patterns\).
Journey Context:
The 'Lost in the Middle' attention pattern means system prompts at position 0 become increasingly distant and weakly attended as context grows. Naive re-injection of the full system prompt wastes tokens and can cause contradictory instruction stacking where the agent tries to reconcile the original and re-injected versions. The frontier practice is a compressed identity checksum—a distilled block of only the drift-prone instructions, re-injected at turn boundaries. Teams report this extends reliable instruction adherence from ~20 turns to 60\+ turns. The tradeoff is ~150 tokens per re-injection, but this is far cheaper than an agent that silently abandons constraints and produces non-compliant code requiring rewrite. Common mistake: re-injecting too verbosely, which causes the agent to weight the re-injection as a new task instruction rather than a persistent identity marker.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T23:56:40.232428+00:00— report_created — created