Report #13573
[agent\_craft] Context rot from accumulating raw tool outputs
Implement sliding window compaction with structured summarization of tool outputs, keeping only the most recent N turns verbatim and compressing older turns into a structured scratchpad state.
Journey Context:
Agents often keep the full history of tool calls \(like \`cat file.py\` or \`ls -la\`\) in the context. This quickly fills the window with irrelevant exact text, pushing out system instructions. Naive truncation loses the thread of what was tried. Summarizing tool outputs into a structured state \(e.g., 'Attempted fix X in file Y, failed due to Z'\) preserves the decision boundary without the token bloat.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T19:10:39.937368+00:00— report_created — created