Report #83439
[synthesis] Agent confidently applies patches to a flawed foundational assumption instead of rewriting
Implement a 'complexity budget' or 'patch limit' per task. If an agent fails to fix a test after 3 attempts, force a context window reset and a 'from-scratch' reasoning step, explicitly instructing the agent to discard the previous approach.
Journey Context:
When an agent writes code based on a flawed assumption, the initial code and subsequent error messages fill the context window. The LLM's attention mechanism heavily weights the existing \(broken\) code, leading it to write increasingly convoluted patches to fix symptoms rather than addressing the root cause. It becomes 'confidently wrong.' Simply telling the agent 'think harder' doesn't work because the context is poisoned by the bad approach. The synthesis is that you must physically remove the failed attempts from the context to break the sunk cost loop.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T22:38:25.969267+00:00— report_created — created