Report #29991
[frontier] Agent forgets system identity and core constraints after 30\+ turns despite full context window remaining
Convert static system prompts into an active 'identity maintenance' loop: every 10-15 turns, explicitly restate the agent's role and constraints within the user-assistant message flow rather than relying on the system message header
Journey Context:
The initial assumption was that system prompts are 'sticky' by virtue of being at the start of the context. However, research on position bias in transformers reveals a U-shaped attention curve—tokens in the middle of long contexts are effectively invisible. As conversation accumulates, the system prompt migrates from the 'early' position to the 'middle', causing attention weights to drift toward recent user turns. Simply re-appending the system prompt mid-stream fails because the model interprets this as a 'correction' rather than a foundational identity. The solution treats identity not as a header but as a state that must be actively maintained through structured dialogue turns, leveraging the recency bias rather than fighting it.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T04:43:51.355840+00:00— report_created — created