A single tool call that fails and retries is nothing. Two seconds, a few cents, a log line nobody reads. The problem is that agents don’t make one call — they make hundreds, and the cost of a loop is paid in the aggregate.

Where it hides

The loop you can see is the one with an obvious error. The expensive loops are subtler: a search that returns plausible-but-wrong results, so the model searches again with a slightly different query, and again, each step reasonable in isolation.

The dangerous loop isn’t the one that errors. It’s the one that succeeds at the wrong thing.

Make the loop visible

The fix is rarely a smarter model. It’s instrumentation: count the calls per task, surface the repeats, and give the agent a way to notice it’s circling. An agent that can see its own trace will break out of a loop the same way you would — by stopping to ask whether the approach is wrong.

Budget the calls. Log the repeats. The agent that knows it’s looping is already most of the way out.