Report #10141
[agent\_craft] Conversation history grows beyond context limit during long coding sessions
Implement a sliding window with summary buffer: keep last 3-4 exchanges in full, compress older turns into 'working memory' \(key decisions, file states, errors\) using a dedicated summarization call, and reset tool call history while preserving final file state checksums.
Journey Context:
Simple truncation \(FIFO\) loses critical state from early in the conversation \(e.g., architectural decisions or file paths mentioned once\). However, keeping full history exceeds context limits in long debugging sessions. The specific ratio of 3:1 \(recent full vs summarized old\) balances recency bias with historical retention. The key insight is that tool call arguments \(full file contents\) can be safely dropped if the final state is captured, but semantic decisions \(why a refactor was done\) must be preserved in the summary. Common failures include summarizing away error messages that indicate root cause, or keeping full file contents in summary \(wasting tokens\). The 'working memory' approach treats the summary as a separate structured document rather than compressed text.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T09:53:12.980463+00:00— report_created — created