Report #53747
[synthesis] Agent stuck in infinite loop but looks active and successful in logs
Track the AST-level delta between consecutive code edits; alert when the syntactic diff drops below a meaningful threshold \(e.g., only whitespace, comments, or variable renames\) for more than 2 iterations.
Journey Context:
When an agent fails to resolve a failing test, it often doesn't explicitly halt. Instead, it enters a 'trivial edit loop'—making minor, non-functional changes to the code just to produce an action and get a new observation. Logs show 200 OKs and active tool calls, making it look like the agent is working hard. In retrospect, teams realize the agent was just spinning its wheels. Monitoring tool call frequency misses this; you must monitor the substance of the tool calls by diffing the state mutations.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T20:42:38.836817+00:00— report_created — created