Report #96514
[synthesis] Agent enters infinite minor-tweak loop when output is almost correct rather than reconsidering approach
Implement a tweak budget: track the number of consecutive modifications producing diminishing returns \(measured by delta in test output or error messages\). When the budget is exhausted, force a full approach reset: clear recent tweak history from context, re-read the original requirement, and generate a fresh solution from scratch.
Journey Context:
When an agent's output is close to correct \(4 of 5 tests pass, output off by one character\), it enters a local optimum: each small tweak seems like the right move because it is 'almost there,' but the remaining gap requires a fundamentally different approach. This mirrors hill-climbing local optima in search, but with a unique twist: the agent's reasoning justifies each tweak convincingly because the gap IS small. The agent does not recognize it needs to abandon its current approach because each individual decision to tweak is locally rational. Reflexion-style self-correction does not help because the agent's reflection also operates in the local optimum. The fix requires a meta-level circuit breaker detecting diminishing returns and forcing a global restart. A full reset loses all progress and context, which is costly, but it is the only way to escape a local optimum the agent cannot recognize from inside.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T20:34:52.248645+00:00— report_created — created