[GH-ISSUE #4536] [BUG]: Agent repeatedly performing same operation #2887

Closed
opened 2026-02-22 18:31:41 -05:00 by yindo · 2 comments
Owner

Originally created by @beyond2060 on GitHub (Oct 13, 2025).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/4536

Originally assigned to: @shatfield4, @timothycarambat on GitHub.

How are you running AnythingLLM?

AnythingLLM desktop app

What happened?

I set up the Anything LMM for the first time on OSX. I connected to openrouter, selected Claude 4.5 Sonnet. Turned on the Generate Charts skill. Asked it to create a simple chart with five bars. It did so but then seemed to do it repeatedly, over and over again. A check of usage on OpenRouter showed it was doing a call about 20 times with the same token numbers. I quit Anything LLM and it stopped. Since this is my first time using it this has put me off it a bit, because this type of bug actually wastes money.

Are there known steps to reproduce?

Unfortunately since I had to quit and reenter the app it didn't save the prompt. But something like:
@agent create a simple bar chart with five bars with random numbers.

Originally created by @beyond2060 on GitHub (Oct 13, 2025). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/4536 Originally assigned to: @shatfield4, @timothycarambat on GitHub. ### How are you running AnythingLLM? AnythingLLM desktop app ### What happened? I set up the Anything LMM for the first time on OSX. I connected to openrouter, selected Claude 4.5 Sonnet. Turned on the Generate Charts skill. Asked it to create a simple chart with five bars. It did so but then seemed to do it repeatedly, over and over again. A check of usage on OpenRouter showed it was doing a call about 20 times with the same token numbers. I quit Anything LLM and it stopped. Since this is my first time using it this has put me off it a bit, because this type of bug actually wastes money. ### Are there known steps to reproduce? Unfortunately since I had to quit and reenter the app it didn't save the prompt. But something like: @agent create a simple bar chart with five bars with random numbers.
yindo added the possible bugneeds info / can't replicateinvestigating labels 2026-02-22 18:31:41 -05:00
yindo closed this issue 2026-02-22 18:31:41 -05:00
Author
Owner

@timothycarambat commented on GitHub (Oct 13, 2025):

This has been known specifically to occur with OR and Claude - we use a monkey patch for OpenRouter specifically because not all models support tool calling - and this could very well be the issue.

However, we have the Skill Deduplicator on any patched provider to prevent exactly that. Was this it exactly same call, or was it the same call with slight variations in the requests?

@timothycarambat commented on GitHub (Oct 13, 2025): This has been known specifically to occur with OR and Claude - [we use a monkey patch](https://github.com/Mintplex-Labs/anything-llm/blob/6270a0a189d34153d5e9e6b255a6d797bf8d3096/server/utils/agents/aibitat/providers/openrouter.js#L9) for OpenRouter specifically because not all models support tool calling - and this could very well be the issue. However, we have the Skill Deduplicator on any patched provider to prevent exactly that. Was this it _exactly_ same call, or was it the same call with slight variations in the requests?
Author
Owner

@beyond2060 commented on GitHub (Oct 14, 2025):

I don't know if the call was exactly the same, but the number of tokens was identical about 20 times in a row, suggesting that it was the same call.

@beyond2060 commented on GitHub (Oct 14, 2025): I don't know if the call was exactly the same, but the number of tokens was identical about 20 times in a row, suggesting that it was the same call.
yindo changed title from [BUG]: Agent repeatedly performing same operation to [GH-ISSUE #4536] [BUG]: Agent repeatedly performing same operation 2026-06-05 14:49:05 -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#2887