Report #40110
[synthesis] Agent loops on the same failed tool call without changing arguments
Inject a monotonically increasing attempt counter and the history of previous arguments into the tool's error prompt, forcing the agent to generate a mutated strategy if attempt > 1.
Journey Context:
Loop detection tools flag repetitions, and LLM docs discuss deterministic generation. The synthesis reveals that LLMs are deterministic state machines: if the input context \(error message\) is identical, the output \(failed fix\) is identical. Simply telling the agent not to loop is a soft constraint that fails. You must alter the input context by explicitly appending the attempt counter and previous failed arguments to break the deterministic generation cycle.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T21:47:45.019348+00:00— report_created — created