Report #64370
[agent\_craft] Agent repeats failed solutions due to context rot
Implement context paging: when a path fails, summarize the failure into a short 'lesson learned', clear the recent turns from the working context, and inject only the summary \+ next steps.
Journey Context:
Agents keep the full history of failed attempts. The model gets anchored to the bad solutions in its context window, leading to infinite loops. Simply adding 'that didn't work' doesn't clear the attention weight on the previous code. Compaction/summarization of failed turns is required to break the loop, mimicking an OS swapping memory pages out of main memory.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T14:31:58.704095+00:00— report_created — created