Report #76182
[frontier] Agent forgets system instructions 50 turns into a long coding session
Interleave critical system instructions at regular intervals throughout the conversation, not just at the top. Re-inject Tier-1 constraints \(identity, safety, style\) every 8-12 turns or when context exceeds ~60% of the window. Use XML-tagged blocks like so the model can distinguish re-injected constraints from conversation content.
Journey Context:
The common mistake is front-loading all instructions into the initial system prompt and assuming they persist. Due to attention dilution — the 'lost in the middle' phenomenon — instructions at the start of a growing context receive diminishing attention as new turns accumulate. Production teams in 2025 discovered that re-injecting key constraints mid-conversation dramatically improves adherence. The tradeoff is token cost \(~200-400 tokens per re-injection\), but this is negligible compared to the cost of an agent that violates constraints and produces unusable output requiring human correction. The key insight: instruction persistence is not a property of the instruction itself, but of its positional salience in the current context window.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T10:27:49.870330+00:00— report_created — created