[GH-ISSUE #3679] [FEAT]: Agent max limits to prevent overthinking #2374

Open
opened 2026-02-22 18:29:24 -05:00 by yindo · 0 comments
Owner

Originally created by @timothycarambat on GitHub (Apr 18, 2025).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/3679

Add a way for the user in some way to specify hard caps on tool calls or other possible "overthinking" during agent execution, so that runaway calls do not result in surprise costs for some models or even lower-end models that hyper-focus on tool calls.

Hey @timothycarambat, thanks for the reply and for digging into the issue! I tested the agent with Claude 3.5 Sonnet and Gemini 2.5 Flash, and both worked well, finishing tasks quickly without burning through tokens or getting stuck in loops.

It does seem like 3.7’s behavior is the main culprit. Your idea of a tool iteration cap sounds like a solid fix to stop this kind of overuse with models like 3.7. Maybe something like Gemini’s thinking budget could also work here?

Originally posted by @LinusAurel in #3675

Originally created by @timothycarambat on GitHub (Apr 18, 2025). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/3679 Add a way for the user in some way to specify hard caps on tool calls or other possible "overthinking" during agent execution, so that runaway calls do not result in surprise costs for some models or even lower-end models that hyper-focus on tool calls. > Hey @timothycarambat, thanks for the reply and for digging into the issue! I tested the agent with Claude 3.5 Sonnet and Gemini 2.5 Flash, and both worked well, finishing tasks quickly without burning through tokens or getting stuck in loops. > > It does seem like 3.7’s behavior is the main culprit. Your idea of a tool iteration cap sounds like a solid fix to stop this kind of overuse with models like 3.7. Maybe something like [Gemini’s thinking budget](https://ai.google.dev/gemini-api/docs/thinking) could also work here? _Originally posted by @LinusAurel in [#3675](https://github.com/Mintplex-Labs/anything-llm/issues/3675#issuecomment-2816103426)_
yindo changed title from [FEAT]: Agent `max` limits to prevent overthinking to [GH-ISSUE #3679] [FEAT]: Agent `max` limits to prevent overthinking 2026-06-05 14:46:11 -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#2374