Report #27082
[architecture] Agent gives answers influenced by stale or irrelevant context from earlier in the session or from previous sessions
Implement explicit context window management: \(1\) summarize and evict old context when it exceeds a working threshold \(e.g., 60-70% of context window\), \(2\) use session boundary markers to isolate cross-session state, \(3\) place the most critical instructions at the start and end of context where attention is strongest, \(4\) never carry raw context from a previous session into a new one without summarization.
Journey Context:
LLMs are susceptible to context contamination—information from earlier in the context window inappropriately influences later responses. The 'Lost in the Middle' phenomenon demonstrates that models don't attend equally to all context positions; they attend most to the beginning and end, with a significant performance drop for information in the middle. Simply growing the context window makes this worse. The fix isn't just truncation \(which loses information\) but active summarization: compress old context into a summary that preserves key facts while removing the raw text that could contaminate. Tradeoff: summarization is lossy and costs tokens, but prevents the alternative of stale context causing confident wrong answers. Sliding-window approaches \(keeping only the last N turns\) are simpler but lose early context that may be critical for task continuity.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T23:51:19.057596+00:00— report_created — created