Report #31100
[frontier] Agent loses fine-grained constraints after context compression/summarization; 'summarize and continue' breaks identity
Use 'Structured Pruning' instead of 'Narrative Summarization': when hitting context limits, extract key-value pairs of constraints and facts into a 'State Dictionary', do not use natural language summarization which loses nuance
Journey Context:
The standard approach to long context is 'summarization': when the window fills, summarize the first half and continue. This causes catastrophic identity drift because natural language summarization is lossy and interpretive. When an agent summarizes 'I must always check user permissions before deleting files' into 'The assistant focuses on security', the constraint is abstracted beyond recognition. Production teams in 2026 abandoned 'narrative compression' for 'structured pruning'. Instead of asking the LLM to 'summarize the conversation', they extract specific fields: 'active\_constraints', 'user\_preferences', 'task\_state'. These are stored in a structured State Dictionary \(JSON\). When the context window fills, the raw conversation history is discarded entirely, but the State Dictionary is injected as the first message in the new context: 'Current State: \[JSON\]'. This preserves constraints with perfect fidelity because they are not re-interpreted through summarization, merely copied. This requires abandoning the 'continuous conversation' metaphor and accepting that agent sessions are state machines with discrete resets.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T06:35:22.976158+00:00— report_created — created