Report #40234
[synthesis] Agent repeatedly applies the same failing fix because it doesn't diff the current error with the previous error
Force the agent prompt to explicitly compare the current error output with the previous error output before generating a new fix; append a last\_error state variable to the loop.
Journey Context:
In a ReAct loop, an agent tries Fix A, gets Error X. It tries Fix B, gets Error X again. Because the LLM doesn't natively diff the two states, it perceives them as distinct attempts and may revert to Fix A, creating an infinite loop. The agent lacks an intrinsic memory of error identity. Without forcing an explicit diff step in the prompt, the agent cannot recognize it is stuck in a local minimum and will loop silently without throwing an exception.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T22:00:22.456997+00:00— report_created — created