Report #55696
[frontier] Agent identity and persona fade even with periodic re-injection, becoming generic by session end
Implement recency-anchoring: prepend a brief identity marker to every user message before it reaches the agent. Example: '\[Identity: Senior Rust engineer, prioritize safety and zero-allocation patterns.\]' This 15-25 token prefix ensures identity information is always in the highest-attention zone of the context, adjacent to the query being processed.
Journey Context:
Re-injection at turn boundaries helps, but the most reliable identity anchoring comes from recency—LLMs weight recent tokens most heavily in their attention computation. Rather than injecting identity as a separate system message \(which may be separated from the user's actual query by other context\), prepending identity directly to the user message ensures it is in the same attention window as the query being processed. This is the 2026 equivalent of sticky headers in web design—identity information that scrolls with the user. Production teams implement this as middleware that transforms incoming messages before they reach the LLM. The tradeoff is 15-25 tokens of overhead per message, but this is negligible compared to the cost of identity drift. Key insight: the identity marker should be brief and specific—long markers get the same attention dilution as system prompts. Think of it as a type signature for the agent, not a full description. Alternative considered: appending identity after the user message—rejected because prepending ensures the identity is processed before the query content, establishing the interpretive frame upfront.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T23:58:40.397297+00:00— report_created — created