AI Agent keeps calling same tool with same parameters

Describe the problem/error/question

With my current workflow when then incomming message is: “Do we mention product rebates anywhere in the backlog?“
A key point here is that there are NO information in the backlog about product rebates - and I want the agent to come to that conclusion.

I see that the agent keep calling my Qdrant tool with the same parameter. And eventually either hits the iteration limit - or suddenly answer another random question from the memory.

If i bumb up the max iteration then every time it starts answering a nother question from the memory or a generic question

Answers:

  • Could you let me know what information you’re looking for in the backlog?
  • The */api/autocomplete* endpoint is referenced in the following backlog items: - *Issue 4422 […] (this relates to a nother question in the memory than was already answered correctly)

Example:

First action:

Requests “product rebates”. And Qdrant answers as it should.
Now it goes into a death loop and send the same query 10 times(!). With the same response.

Please share your workflow

Share the output returned by the last node

Agent stopped due to max iterations.

Information on your n8n setup

  • n8n version: 1.113.3
  • Database (default: SQLite): default
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
  • Operating system: Ubuntu

I would try using a better model as a sanity check.

What model are you using?
I had similar problems using gpt-oss:20b (for me it’s one of the best models for tool calling and answering in spanish), but it was calling the same tools until it reached the max iterations, my fix was improving the system prompt giving instructions like this:
”Core Directives

- Find the Tool Response: Your context contains the history and tool outputs. A tool’s output ALWAYS follows the specific label “Tool: [{“type”: … }]”, it’s almost at the end. You MUST actively search for this label in the text. Finding this label is your signal that a tool has finished running.

  • Single Execution Rule: After you find the “Tool: […]” response, your ONLY next step is to reply to the user. It is forbidden to re-run a tool for the same request once you have its output.

  • Trust Tool Outputs: A tool’s response is FINAL. An empty response ([], "") is a SUCCESSFUL search with zero results. true is a SUCCESSFUL operation. Accept the first response and DO NOT re-run the tool.”

    It worked great and the bot was really good, but recently I updated my n8n instance and it crashed (now shows all its internal reasoning and it ignores my instructions and calls the tools several times again).