Does a tool-call retry limit stop an agent from looping forever?

Only if the limit actually sits on the path that’s repeating. In a study of 6,549 open-source agent repositories, every one of the 68 confirmed infinite-loop cases traced back to what the authors call a missing strong bound, not to bounds being unavailable: the frameworks involved, including LangGraph, AutoGen, LangChain, CrewAI, and the OpenAI Agents SDK, all support some form of iteration or retry limit. The problem was coverage, not absence. A max_iterations or recursion_limit set on the overall run doesn’t stop a while loop retrying one LLM call inside a single node, and that exact shape, a tool or model call retried with no bound of its own, was tagged as a root cause in 41% of the confirmed cases, the largest single pattern; a model deciding on its own when to stop trying was tagged in 38%.

So a retry limit stops the loop only when it constrains the actual retrying call, not the run as a whole. That’s the same gap that leaves an agent stuck in a loop with nothing ever throwing an error: the limit existed, just not on the path that mattered.

sources

keep reading

More on this.

Self-host Tessary.

Free and open source. Point it at the traces your agent already emits.

Self-host Tessary for me by following https://github.com/tessaryai/tessary/blob/main/setup.md

docker compose -f oci://docker.io/tessaryai/tessary:compose up -d -y