Skip to content

Fix duplicate predefined tools in dynamic tools system message#11101

Merged
RomneyDa merged 1 commit intocontinuedev:mainfrom
MumuTW:fix-tools-duplication-11064
Mar 10, 2026
Merged

Fix duplicate predefined tools in dynamic tools system message#11101
RomneyDa merged 1 commit intocontinuedev:mainfrom
MumuTW:fix-tools-duplication-11064

Conversation

@MumuTW
Copy link
Contributor

@MumuTW MumuTW commented Mar 5, 2026

Summary

  • iterate only over tools without predefined system-message descriptions when building the dynamic tool definitions section
  • prevent built-in/predefined tools from being duplicated when MCP/dynamic tools are present
  • add a regression assertion verifying predefined tools appear only once in mixed tool lists

Fixes #11064.

Testing

  • Unable to run local vitest in this workspace because project dependencies are not installed (node_modules missing).

Summary by cubic

Prevents duplicate predefined tools in the dynamic tools section of the system message. Only tools without a predefined description are included, and a test guards against regressions.

  • Bug Fixes
    • Generate dynamic definitions from tools with dynamic messages only.
    • Avoid duplicating built-in/predefined tools when dynamic tools are present.
    • Add regression assertion to ensure predefined tools appear once in mixed lists.

Written for commit 8a16aa7. Summary will update on new commits.

@dosubot dosubot bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Mar 5, 2026
@MumuTW MumuTW requested a review from a team as a code owner March 5, 2026 23:45
@MumuTW MumuTW requested review from sestinj and removed request for a team March 5, 2026 23:45
@MumuTW
Copy link
Contributor Author

MumuTW commented Mar 5, 2026

I have read the CLA Document and I hereby sign the CLA

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

Copy link
Collaborator

@RomneyDa RomneyDa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MumuTW nice find!

@github-project-automation github-project-automation bot moved this from Todo to In Progress in Issues and PRs Mar 10, 2026
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Mar 10, 2026
@RomneyDa RomneyDa merged commit e63c5f8 into continuedev:main Mar 10, 2026
53 of 61 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in Issues and PRs Mar 10, 2026
@github-actions github-actions bot locked and limited conversation to collaborators Mar 10, 2026
@RomneyDa
Copy link
Collaborator

Credit to @shanevcantwell for also finding and fixing this bug on #11068

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

Labels

lgtm This PR has been approved by a maintainer size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

System message tools duplicates built-in tools when MCP tools present

2 participants