Report #49900
[architecture] Agent context window exhaustion during long, multi-step tasks
Implement a rolling context window with summarization. When the context reaches a threshold \(e.g., 80% capacity\), trigger a summarization step that condenses the history into a running summary and clears the raw history, keeping only the system prompt, the summary, and the most recent N turns.
Journey Context:
Agents executing long autonomous runs eventually hit the context limit and crash, or the LLM degrades in quality as it gets distracted by early, irrelevant steps. Simply truncating history loses critical early instructions. Summarization trades a small amount of detail for infinite operational length. The key is to keep the latest steps unsummarized for precise code execution, while the summary maintains the high-level narrative.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T14:14:28.124384+00:00— report_created — created