Report #56503
[architecture] Agent crashes or degrades when conversation history exceeds the LLM context window
Implement virtual context management: use the LLM context window as 'main memory' and a vector DB as 'swap space'. When main memory fills, move the oldest or least relevant items to swap; when they are needed, page them back in.
Journey Context:
Naive truncation of chat history loses early instructions or critical facts. Simply summarizing loses granular details. Treating the context window like RAM and the DB like disk allows infinite context with bounded cost, preserving both high-level summaries and the ability to fetch exact details on demand.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T01:19:50.725715+00:00— report_created — created