Skip to content

Conversation

@mcowger
Copy link
Contributor

@mcowger mcowger commented Nov 29, 2025

Context

Implements parallel tool calling (received in single request from service), executed sequentially, based on Roo Code PRs #9621 and #9273.

Implementation

  1. Multiple Native Tool Calls Per Turn
    Native protocol (OpenAI-style) can now execute multiple tools in a single assistant message
    Removed didAlreadyUseTool restriction for native protocol
    XML protocol maintains single-tool-per-message behavior for backward compatibility
    Protocol detection based on presence of tool call ID (native calls have IDs, XML calls don't)
  2. Tool Failure Guardrail System
    Added didToolFailInCurrentTurn flag to prevent attempt_completion after tool failures
    Flag resets at start of each new API request cycle, scoping failures to single assistant messages
    Updated all 19 tools to set the flag when encountering errors
    Prevents scenarios like: read_file: failure! → attempt_completion: blocked!
    Allows user override in subsequent turns: read_file: failure! → user message → attempt_completion: allowed!
  3. System Prompt Updates
    Updated tool-use.ts to clarify native protocol supports multiple tools per message
    Removed "ALWAYS wait for confirmation" guideline that only applies to XML protocol
    Adjusted tool-use-guidelines.ts to be protocol-aware
  4. Tool Result Handling
    Implemented duplicate tool_result prevention for native protocol
    Each tool call ID only gets one tool_result block
    Maintains separate handling for XML vs native protocols

Screenshots

Screenshot 2025-11-28 at 7 41 35 PM

How to Test

Enable the Parallel tool calling experiment in Experimental Settings.

Make a request for 2 independent actions:

`>Read the README.md file in this directory, and update the To Do list to add "Check for coolness". These are independent actions and should be requested in the SAME response.

Get in Touch

mcowger

… minor updates to types and such.

Next Step: localization and tests updates.
@changeset-bot
Copy link

changeset-bot bot commented Nov 29, 2025

⚠️ No Changeset found

Latest commit: f715ee7

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@mcowger
Copy link
Contributor Author

mcowger commented Nov 29, 2025

Not ready for review yet, but just FYI/heads up @chrarnoldus

@mcowger
Copy link
Contributor Author

mcowger commented Nov 29, 2025

Actually looks like it might come in via #4083

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant