Report #101660
[agent\_craft] My agent's context window fills up with stale turns, old file versions, and completed subtasks, so it forgets what it is doing now.
Keep a fixed-size verbatim window of the most recent N turns plus a running state summary of decisions, open questions, and edited files; rewrite the summary every turn instead of appending. Drop or compress anything older than N turns rather than truncating blindly.
Journey Context:
Context rot is the silent killer of long agent runs. Many agents keep appending messages until they hit the token limit, then truncate the middle. That destroys the plan and the user's original constraints exactly when the task is longest. Sliding-window plus summarization costs a little compute each turn but preserves the current intent at the top of the window and combats the lost-in-the-middle effect. Resist the urge to summarize the current turn's raw tool output before the agent has acted on it.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-07-07T05:13:56.808373+00:00— report_created — created