Report #58762
[frontier] Agent forgets system prompt constraints after 30\+ turns in same session
Use the sandwich re-injection pattern: re-state the 3 most critical constraints at the END of the conversation context before the agent's next action, not just at the beginning. Inject them as orchestration-layer messages \(not visible to user\) every 10-15 turns.
Journey Context:
Research on long-context LLMs demonstrates a U-shaped attention curve: models attend strongly to the beginning and end of context but lose signal in the middle. A system prompt at position 0 gets buried as context grows, dropping below the attention threshold needed to override recent user turns. Teams that just make the system prompt longer make the problem worse—more tokens at position 0 doesn't compensate for the attention decay. The counterintuitive fix: duplicate critical constraints at the END of context, where attention is highest. The tradeoff is token cost \(~50-100 tokens per re-injection\), but this is negligible compared to the cost of a drifted agent producing incorrect output that must be undone. This is replacing the 2024 pattern of 'set and forget' system prompts with periodic re-anchoring.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T05:07:13.900357+00:00— report_created — created