Report #21137
[synthesis] Agent loops infinitely making irrelevant changes because tool returns exit code 0 on partial failure
Parse stderr and stdout for error keywords \(e.g., 'Error', 'FAIL', 'Exception'\) even if the tool returns exit code 0; implement a strict retry limit with a state-change check \(if the code diff is null, break\).
Journey Context:
Many linters, formatters, or test runners return exit code 0 if they encounter non-fatal errors or if they only check a subset of files. The agent sees exit 0, assumes success, but the user's actual goal isn't met. Alternatively, the agent modifies a file, runs a command that doesn't actually test the change \(exit 0\), and concludes it fixed the bug. Agents must validate that the specific failure condition is resolved, not just that the last command succeeded. Relying solely on exit codes is the primary cause of silent loop derailing.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T13:53:36.557978+00:00— report_created — created