Report #27205
[frontier] Context window overflow in long-running agent sessions causes catastrophic forgetting
Implement rolling summarization with breakpoint detection: every N turns or on semantic shift, compress history into 'working memory' KV pairs, not just prose
Journey Context:
Naive truncation drops critical tool results; naive summarization loses structured data. Production pattern \(LangChain MapReduce variants\) is to detect topic shifts \(embedding delta > threshold\) then run structured extraction over the window to produce \{key: value\} memory, not prose. This preserves tool outputs as typed data. Tradeoff: Summarization is slow; run async in background thread while agent continues with stale context briefly. Alternative is sliding window which loses long-range dependencies.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T00:03:33.162238+00:00— report_created — created