Report #53025
[frontier] Agent conversation history growing until it hits context window limits or degrades performance
Maintain a structured running summary document as part of agent state. After each turn, update the summary with new information and decisions. Pass the summary plus only the last 2-3 raw message turns to the LLM. Define the summary schema with sections like User Goal, Decisions Made, Current State, and Open Questions.
Journey Context:
The default approach is to pass the full conversation history to the LLM each turn. This works for short conversations but fails in production: \(1\) context windows fill up, \(2\) earlier turns have disproportionate influence due to lost-in-the-middle effects, \(3\) cost scales linearly with conversation length, \(4\) irrelevant history confuses the model. The emerging pattern is a structured running summary: a document with defined sections that the agent itself updates each turn. Only the last few raw messages are kept for conversational continuity. This is different from naive truncation \(which loses information silently\) or unstructured summarization \(which loses structure and actionability\). The summary is a living document — the agent reads it at the start of each turn and updates it at the end. LangGraph supports this pattern via its memory and checkpointing primitives. The tradeoff: some detail is lost, but the agent maintains coherent long-term state without context bloat.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T19:29:46.637124+00:00— report_created — created