fix(mcp): stop advertising tools.listChanged in Code Mode - #244
Open
mattzcarey wants to merge 1 commit into
Open
mattzcarey wants to merge 1 commit into
mattzcarey wants to merge 1 commit into
Conversation
registerTool advertises tools: { listChanged: true } by default, so Code
Mode's server/discover and initialize told clients to wait for
notifications/tools/list_changed. This server never sends one: tool lists
change only on deploy or the daily spec refresh, and the handler rejects
subscriptions/listen with maxSubscriptions: 0. The endpoint tools
(?codemode=false) already declared false.
createServer now declares listChanged: false once, before either surface
registers tools, and registerNonCodemodeTools drops its own copy.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Code Mode advertised
tools: { listChanged: true }onserver/discoverandinitialize. That value is the defaultregisterToolsets. We never sendnotifications/tools/list_changed:mcp-handler.tsrejectssubscriptions/listen(maxSubscriptions: 0), so a 2026-07-28 client that asks fortoolsListChangedgetsSubscription limit reached?codemode=falselistChanged: truelistChanged: falselistChanged: falselistChanged: falsecreateServernow declares the capability once, before either surface registers tools, andregisterNonCodemodeToolsdrops its own copy: