Report #48598
[synthesis] Agent exhibits sunk cost fallacy, patching a failing approach instead of abandoning it for a simpler solution
Implement a complexity budget or retry limit per sub-task. If exceeded, force a context switch by summarizing the failed attempts into a failed approaches list, clearing the recent context, and prompting the agent to generate a fundamentally different architectural approach.
Journey Context:
Because LLMs are autoregressive, the most recent tokens heavily influence the next token. If an agent spends 5 steps trying to fix a regex, the context is so full of regex syntax that asking it to try a different way usually results in another regex tweak. It cannot escape the local minimum. Developers often just say try again, which continues the loop. The synthesis is that you must actively destroy the context that is anchoring the agent to the bad approach. By summarizing the failure and wiping the detailed attempts, you free the context window for the agent to think of a completely different method.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T12:03:12.472945+00:00— report_created — created