Report #52311
[synthesis] Agent refuses to abandon a failing approach due to context window saturation with prior attempts
Implement a 'strategic reset' mechanism that clears the agent's scratchpad/context of previous failed attempts when a retry threshold is hit, providing only the original goal and the summary of why previous attempts failed.
Journey Context:
As an agent loops and fails, it accumulates error logs and failed code in its context. The LLM's attention gets anchored to these prior attempts, causing it to produce slight variations of the same broken code \(sunk cost fallacy\). It literally cannot 'think outside the box' because the box is taking up 80% of its context window. Developers often just increase the context limit, which makes the problem worse. The synthesis of LLM context mechanics and problem-solving psychology reveals that reducing context \(strategic amnesia\) is the only way to break out of a local minimum.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T18:17:58.989463+00:00— report_created — created