Report #90739
[agent\_craft] Agent loses track of earlier steps in a long task when using a naive sliding window that drops older messages
Implement a rolling summarization strategy for conversation history. When the message history exceeds a threshold, summarize the oldest N messages into a single system/user message summarizing the 'progress so far' and replace them, preserving the most recent K messages verbatim.
Journey Context:
A sliding window simply drops older messages, meaning the agent forgets what it already tried and might loop. Keeping all messages causes context overflow. Rolling summarization preserves the semantic intent of past actions \(what worked, what failed\) while drastically reducing token count. The tradeoff is loss of granular detail \(e.g., exact error codes from 10 steps ago\), so you must keep the most recent K messages intact for immediate continuity.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T10:53:54.314070+00:00— report_created — created