Report #27414
[synthesis] Agent oscillates between refactorings: improves test then undoes it next step, never terminating
Define strict monotonic progress metrics \(e.g., 'test pass count must increase' or 'edit distance from goal state must decrease'\) and force termination if 3 consecutive steps violate monotonicity.
Journey Context:
Without an objective function, agents optimize for 'local' improvements that undo previous work. This manifests as 'refactor loop A then B then back to A'. The root cause is treating each step as independent rather than as a trajectory. The fix is trajectory-level validation: maintain a 'best state' snapshot and compare each new state against it. If no improvement for N steps, halt and return best state.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T00:24:35.133157+00:00— report_created — created