-
Notifications
You must be signed in to change notification settings - Fork 2.8k
fix: exclude XML tool examples from MODES section when native protocol enabled #9367
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Contributor
Review complete. No issues found. The changes successfully address the race condition by using tool call ID presence as a stable indicator of the protocol used, and appropriately exclude XML examples from the MODES section when native protocol is enabled. Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues. |
b360ba2 to
4bd65f9
Compare
mrubens
approved these changes
Nov 18, 2025
mini2s
added a commit
to zgsm-ai/costrict
that referenced
this pull request
Nov 19, 2025
* fix: prevent MCP server restart when toggling tool permissions (RooCodeInc#8633) * fix: prevent MCP server restart when toggling tool permissions Add isProgrammaticUpdate flag to distinguish between programmatic config updates and user-initiated file changes. Skip file watcher processing during programmatic updates to prevent unnecessary server restarts. * fix(mcp): prevent server reconnection when toggling disabled state Fixed bug where MCP servers would reconnect instead of staying disabled when toggled off. The issue was that toggleServerDisabled() used stale in-memory config instead of reading the fresh config from disk after writing the disabled flag. Changes: Added readServerConfigFromFile() helper to read and validate server config from disk Updated disable path to read fresh config before calling connectToServer() Updated enable path to read fresh config before calling connectToServer() This ensures the disabled: true flag is properly read, causing connectToServer() to create a disabled placeholder connection instead of actually connecting the server. + refactor(mcp): use safeWriteJson for atomic config writes Replace JSON.stringify + fs.writeFile with safeWriteJson in McpHub.ts to prevent data corruption through atomic writes with file locking. * fix(mcp): prevent race condition in isProgrammaticUpdate flag Replace multiple independent reset timers with a single timer that gets cleared and rescheduled on each programmatic config update. This prevents the flag from being reset prematurely when multiple rapid updates occur, which could cause unwanted server restarts during the file watcher's debounce period. + fix(mcp): ensure isProgrammaticUpdate flag cleanup with try-finally Wrap safeWriteJson() calls in try-finally blocks to guarantee the isProgrammaticUpdate flag is always reset, even if the write operation fails. This prevents the flag from being stuck at true indefinitely, which would cause subsequent user-initiated config changes to be silently ignored. * docs(readme): update readme images and image compression * docs: replace inline base64 images with image file references * Merge remote-tracking branch 'upstream/main' into roo-to-main * feat(terminal): refactor execa command execution for shell handling * Feat: Add Minimax Provider (fixes RooCodeInc#8818) (RooCodeInc#8820) Co-authored-by: xiaose <[email protected]> Co-authored-by: Matt Rubens <[email protected]> * Release v3.29.4 (
Excludes XML tool call examples from the MODES section when native tool protocol is enabled to avoid confusing the model with XML syntax when it should use native tool calling.
Important
Excludes XML tool examples from MODES section when native protocol is enabled by checking tool call IDs.
modes.ts.presentAssistantMessage.ts.getModesSection()inmodes.tsto acceptskipXmlExamplesparameter.generatePrompt()insystem.tsto passisNativeProtocoltogetModesSection().presentAssistantMessage()inpresentAssistantMessage.tsto use tool call ID for protocol determination.This description was created by
for b360ba2. You can customize this summary. It will automatically update as commits are pushed.