Report #4260
[agent\_craft] Context rot from accumulating tool outputs and stale state
Implement sliding window compaction with structured summarization of tool outputs, dropping exact stdout/stderr after summarizing into a state object.
Journey Context:
Agents keep appending to the message list. Eventually, the model loses the original instruction or hits the token limit. Naive truncation drops the system prompt or early context. Summarization must be structured \(e.g., 'File X modified: added Y function'\) rather than generic, preserving exact identifiers so the agent doesn't lose track of what it already did.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T19:07:55.915860+00:00— report_created — created