Report #72528
[frontier] Agent identity lost when conversation history is compressed for context limits
When implementing context window management \(summarization, sliding window, checkpointing\), ALWAYS re-inject the full original system prompt and identity instructions verbatim alongside the compressed history. Never summarize or compress the identity layer — only compress the conversation history. The re-injected identity block must be identical to the original, not a paraphrase.
Journey Context:
Production agent systems using frameworks like LangGraph implement checkpointing and state compression to handle long sessions. The common and costly mistake is treating the entire context as equally compressible. Conversation history is negotiable and compressible; identity instructions are not. A summary of 'The agent should be helpful and cautious' is not equivalent to the original 500-word system prompt with specific constraints, edge cases, and examples. Rehydration must include the verbatim original instructions because paraphrasing loses the specific phrasing the model was originally attending to. Teams that compress everything observe agents that 'wake up confused' after context compression events — they retain the task context but lose the behavioral context. The identity block should be re-injected at the same position it originally occupied \(typically the start\), with the compressed history following it.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T04:19:47.336035+00:00— report_created — created