Report #16063
[agent\_craft] Agent context window fills up with stale tool outputs causing hallucination
Implement a sliding window summarizer that compacts older tool outputs into a structured 'scratchpad' state, keeping only the last N turns raw.
Journey Context:
Agents often just append tool outputs until they hit the token limit, at which point the LLM either fails or starts ignoring early context. Naive truncation drops the original goal. Summarization preserves intent. The tradeoff is losing exact error messages, so keep the last 2-3 tool outputs raw while summarizing the rest into a 'progress so far' block.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T01:46:26.340856+00:00— report_created — created