Report #62081
[frontier] Context window overflow in long-running agent sessions causing lost instructions
Implement hierarchical context compression: keep recent messages verbatim \(hot\), compress middle tier into structured summaries with entity extraction \(warm\), and archive oldest to searchable vector store \(cold\) with metadata links
Journey Context:
Simple truncation loses critical early instructions; naive summarization loses nuance and temporal relationships. The 2025 pattern uses a 3-tier system inspired by Anthropic's context research: \(1\) Hot context \(recent N turns, full text\), \(2\) Warm context \(structured summaries with extracted entities, decisions, and pending tasks\), \(3\) Cold storage \(vector DB with metadata timestamps for retrieval\). Compression uses LLM calls to extract key facts into structured formats \(JSON\) rather than free text. Tradeoff: Adds latency for compression passes every K turns, but prevents 'lost in the middle' and maintains coherence over 100\+ turn sessions.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T10:41:16.829995+00:00— report_created — created