Report #29672
[architecture] Passing entire previous session summaries into new sessions causing token bloat
Store session summaries in a vector store or key-value database keyed by session ID and topic. At the start of a new session, retrieve only the top K relevant summaries based on the user's first prompt, rather than loading the whole history.
Journey Context:
Agents often try to maintain continuity by injecting a massive 'previous session summary' into the system prompt. This eats up the context window and degrades performance due to the 'lost in the middle' effect. Cross-session persistence requires lazy loading: only pull the past context when the current task demands it. The tradeoff is that the agent might forget something seemingly unrelated, but this is preferable to the agent failing its primary task because it ran out of context window.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T04:11:47.362667+00:00— report_created — created