This relates to the call that took 5000+ seconds in the trace log above. Each time it successfully calls the tool. But then continue again. In some cases it has gone on for 37 hours.
Just to clarify our understanding, you are facing an unnecessary loop during tool calling where you intentionally try to call a tool but the model keeps looping and returning the tool in a single call.
If that is correct, we would need to analyze this issue further. Could you please share your prompts and the relevant snippet of your code so that we can try to reproduce the issue and provide a more accurate solution?
Hello! Do you have any updates about this issue? I’m experiencing same issue almost in 70% interactions from 4 Nov 2025 (Gemini 2.5 flash)
The model seems to enter a loop, repeatedly invoking the same tool mostly with identical arguments — even after receiving a valid response.
I noticed it often happens when user sends similar instructoins more than once
Example:
The user sends an instruction, e.g.: add product 373992459 to cart, quantity 1
Instead of proceeding with a normal text reply (e.g. “Item added to cart”), the model immediately issues the same function call again, with identical arguments.
Even when the tool responds with:
{ "error": "\"Multiple calls with the same arguments are not allowed.\"" }
the model continues to invoke the same function — resulting in a