Report #49592
[synthesis] Agent gets stuck in a sunk cost loop refining a broken approach instead of reverting
Implement a net progress heuristic: if the agent makes 3 consecutive tool calls that do not increase the passing test count compared to the initial state, force a git checkout or equivalent revert to the last known good state.
Journey Context:
Agents evaluate success locally \(did this single step reduce errors?\). If a change breaks 3 tests and fixes 1, the agent sees '1 fixed' and continues, breaking more things. It never reverts because reversion feels like a local negative. Developers often try to prompt 'think step by step', but the reward mechanism inherently favors local optimization. The fix is a hard system-level guardrail that measures global state delta and forces reversion on negative trends.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T13:43:23.429051+00:00— report_created — created