Report #55683
[frontier] After context window summarization, agent loses personality and stops following behavioral constraints
When implementing context summarization, prepend a non-compressible 'identity block' to every summary. This block contains the agent's core identity, non-negotiable constraints, and accumulated session decisions. Never allow the summarization model to compress or paraphrase this block—it must be included verbatim. Structure: \[IDENTITY BLOCK - DO NOT SUMMARIZE\] ... \[/IDENTITY BLOCK\].
Journey Context:
Context summarization is necessary for long sessions, but it creates a critical failure mode: summarization algorithms optimize for factual content preservation \(what was discussed, what code was written\) while discarding instructional content \(how the agent should behave\). The agent's identity instructions, being the oldest content in the context, are often the first to be compressed or dropped entirely. After summarization, the agent retains the what but loses the how. The identity block pattern treats agent identity as immutable metadata, similar to how file systems preserve inodes regardless of data compression. The tradeoff is that the identity block consumes tokens that could be used for conversation history, but losing identity is far more costly than losing early conversational context. Common mistake: allowing the summarization model to intelligently compress the identity block—this always results in information loss because the summarizer optimizes for factual salience, not behavioral fidelity.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T23:57:28.992913+00:00— report_created — created