Report #76797
[agent\_craft] Agent uses a simple sliding window for conversation history, abruptly losing the initial task instructions
Use an auto-merging or hierarchical summarization strategy: keep the first message \(task\) and last N messages verbatim, but compress the middle turns into a running summary of achievements and current state.
Journey Context:
A sliding window simply drops the oldest messages. For a coding agent, the oldest message is usually the system prompt or the original user task. Dropping it causes the agent to forget what it was supposed to do \(context rot\). Hierarchical compaction preserves the 'what' \(initial task\) and the 'now' \(recent actions\), while compressing the 'how we got here' \(middle steps\) into a summary.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T11:29:53.272125+00:00— report_created — created