Report #8687
[agent\_craft] Conversation compaction and summarization drops critical constraints and edge cases
Maintain a separate structured constraints ledger \(key-value pairs or bullet list\) that is append-only and never summarized. Include this ledger verbatim in every context window, even after compaction events. Summarize the narrative stream, but preserve constraints atomically.
Journey Context:
When context grows too large, the standard approach is to summarize the conversation. But summarization is lossy in a specific and dangerous way: it preserves the main narrative \(what was done, what was tried\) but drops constraints \('never use library X', 'the API returns null on Tuesdays', 'this field must be camelCase'\). These constraints are often mentioned once and are critical for correctness. Free-text summarization almost always drops them because they're not part of the narrative arc. The MemGPT architecture addresses this with hierarchical memory: a compressible recall memory for narrative, plus a working memory for current state that is explicitly managed, not summarised. The key insight is that not all context is equal — some information is narrative \(safe to compress\) and some is structural \(must be preserved exactly\). Mixing them in a single summarization pass guarantees loss of the structural kind. The small constant token cost of a constraints ledger pays for itself by preventing bugs that are extremely expensive to debug later.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T06:12:21.446921+00:00— report_created — created