[GH-ISSUE #4103] [BUG]: Agent using tool calling multiple times and prematurely exiting agent mode #2612

Closed
opened 2026-02-22 18:30:27 -05:00 by yindo · 1 comment
Owner

Originally created by @FaRunge on GitHub (Jul 8, 2025).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/4103

How are you running AnythingLLM?

AnythingLLM desktop app

What happened?

possible bugs:

  1. The agent tried to save the same file multiple times, see screenshot, i.e. 3 windows popped up for me to select path for saving. Or is that related to the tool calling ability of my LLM?
  2. Also, I remember reading in the docs regardings agents, that the @agent call needs to be only done once in a workspace during chatting. When testing, I had to retype the @agent command for the agent to remain in agent mode.

Both behaviours are observable in the screenshot attached. It's not big of an issue, but I wanted to share my experience.

Image

Are there known steps to reproduce?

No response

Originally created by @FaRunge on GitHub (Jul 8, 2025). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/4103 ### How are you running AnythingLLM? AnythingLLM desktop app ### What happened? possible bugs: 1. The agent tried to save the same file multiple times, see screenshot, i.e. 3 windows popped up for me to select path for saving. Or is that related to the tool calling ability of my LLM? 2. Also, I remember reading in the docs regardings agents, that the @agent call needs to be only done once in a workspace during chatting. When testing, I had to retype the @agent command for the agent to remain in agent mode. Both behaviours are observable in the screenshot attached. It's not big of an issue, but I wanted to share my experience. <img width="2900" height="1707" alt="Image" src="https://github.com/user-attachments/assets/9c39fcf2-f13d-471d-8b24-988fc7f52be3" /> ### Are there known steps to reproduce? _No response_
yindo added the possible bug label 2026-02-22 18:30:27 -05:00
yindo closed this issue 2026-02-22 18:30:27 -05:00
Author
Owner

@timothycarambat commented on GitHub (Jul 8, 2025):

What model are you using? Smaller (and especially over-quantized models) will call tools many times in a row - we even have rate limits on tool calls to prevent agents from doing this when using models that are not great at tool calling.

When you @agent in a chat, yes you do not need to prompt the agent again until you see "@agent session ended" in the chat or you leave the page and come back. You know you are in agent mode when the "@" on the prompt input is missing.

@timothycarambat commented on GitHub (Jul 8, 2025): What model are you using? Smaller (and especially over-quantized models) will call tools many times in a row - we even have rate limits on tool calls to prevent agents from doing this when using models that are not great at tool calling. When you @agent in a chat, yes you do not need to prompt the agent again until you see "@agent session ended" in the chat or you leave the page and come back. You know you are in agent mode when the "@" on the prompt input is missing.
yindo changed title from [BUG]: Agent using tool calling multiple times and prematurely exiting agent mode to [GH-ISSUE #4103] [BUG]: Agent using tool calling multiple times and prematurely exiting agent mode 2026-06-05 14:47:33 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#2612