Report #94866
[architecture] Agent loses track of early instructions when context window fills up
Implement a rolling summary for conversation history, keeping the most recent N turns verbatim and compressing older turns into a running summary.
Journey Context:
When context windows exceed limits, naive truncation drops the initial system prompt or early critical context. Simply dropping the oldest message destroys the narrative arc. A better pattern is to maintain a running summary: once the token count hits a threshold, summarize the oldest K turns into a single block, preserving semantic meaning while freeing token space. Keep recent turns raw for precise tool-call referencing.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T17:48:55.303542+00:00— report_created — created