-
Notifications
You must be signed in to change notification settings - Fork 2.6k
allow use five tools in one call #3840
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typographical error: The phrase too many tools has already been used should be too many tools have already been used, and Only five tool may be used should be Only five tools may be used.
src/core/prompts/tools/new-task.ts
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo: In the sentence IMPORTANT: This tool could only called once per message., please change it to IMPORTANT: This tool can only be called once per message.
| IMPORTANT: This tool could only called once per message. | |
| IMPORTANT: This tool can only be called once per message. |
src/core/task/Task.ts
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo: In the message string, consider changing "Only five tool may be used" to "Only five tools may be used" for grammatical correctness.
| "\n\n[Response interrupted by a tool use result. Only five tool may be used at a time and should be placed at the end of the message.]" | |
| "\n\n[Response interrupted by a tool use result. Only five tools may be used at a time and should be placed at the end of the message.]" |
|
Hey, i also have a version for multi-tool-calling, though yours is much cleaner. I also see you limited attempt_completion to be called alone, very nice. Some things to consider maybe:
You can check out my glued-together PoC version here: https://github.com/Ruakij/Roo-Code/tree/feat/multiple-tool-calls |
|
why limit to 5? why not make it adjustable? |
|
The current implementation has the potential to introduce bugs when tools are executed in complex sequences (e.g., read → write → read → write → search → write) or when specialized tools like attempt_completion are used. This essentially creates race conditions where the timing and order of tool execution can lead to unpredictable behavior. To mitigate these issues, tools should be categorized into functional groups that support parallel execution, enabling multiple tools to operate simultaneously without conflicts. |
I have had similar ideas, but from the actual test results, large models will not generate read-write operations. Multiple tools will only be called when there is a real need (for example, when multiple files must be read). Therefore, I only made special treatments for |
This is just a number that I found to be effective. I don't think it's necessary to make this value adjustable, as it's a bit too detailed. |
I don't quite understand "move the tools to the bottom", there doesn't seem to be such a restriction in the prompt?
I didn't add it because I don't think anyone will change this setting (or I haven't encountered a situation where I feel the need to change the number of tools so far in the version with 5 tools)
https://github.com/RooCodeInc/Roo-Code/pull/3840/files#diff-d70cf61ca4995225bfa29e16f01ed7f7cdb85ba5c3f7e0d547151ae9433d5546R223
So far, I have not encountered this situation. If there is a case that can be reproduced, please share it.
me too
I agree that it would be best if all commands to be executed in the current dialogue and the steps being executed can be displayed. However, this change may be larger, and I think it is worth looking at the feedback of the current version first. |
https://github.com/RooCodeInc/Roo-Code/pull/3840/files#diff-ec3b024cdaad55c3e92c0d0d4293bbc785e69f76bf646132cb0923f44fb3df22R1265
Had some cases where i gave the model a list of Sonar-issues of like 15 files and he would read all of them in one response, then fix all issues in the next, was pretty nice.
Unfortunately nothing to really reproduce it reliably. See this: Image
Agreed, we can make a nicer UI later |
|
Interesting exploration! Any thoughts on how auto-approval / manual approval should work with multiple tool calls? |
|
stale |

Related GitHub Issue
Closes: #3839
Description
didAlreadyUseToolto an integer type, and updated the corresponding logic for setting and checking it.new_taskandattempt_completion_task.Based on my testing, the LLM generally does not overuse tool calls, and it performs well in scenarios where multiple tool calls are genuinely needed.
Test Procedure
Type of Change
srcor test files.Pre-Submission Checklist
npm run lint).console.log) has been removed.npm test).mainbranch.npm run changesetif this PR includes user-facing changes or dependency updates.Screenshots / Videos
Documentation Updates
Additional Notes
Get in Touch
Important
Allows up to five tool uses per message, updates tool usage logic, and modifies related prompts and functions.
didAlreadyUseToolchanged to integer inTaskclass to track tool usage count.presentAssistantMessage().attempt_completiontool from being used with others inpresentAssistantMessage().getSharedToolUseSection()to reflect new tool usage limit.getNewTaskDescription()thatnew_taskcan only be called once per message.newTaskTool(), incrementsdidAlreadyUseToolby 5 to prevent further tool use after creating a new task.This description was created by
for 55e6c1360ea94fc230ae2fa476940bfa9b304f52. You can customize this summary. It will automatically update as commits are pushed.