Repository navigation
Refuse pre-initialize requests locally (Claude Code's server/discover probe took the runtime down) - #18
Merged
Conversation
…cover probe cannot take the runtime down Claude Code 2.1.289 sends a server/discover probe before initialize. cua serve forwarded it to the vendor runtime, whose rmcp exits on any pre-initialize request, so every cua serve registration failed to connect. Any request other than initialize that arrives before initialize is now answered -32601 and never forwarded. Spec Surprises and Decision Log record the finding. Closes #17
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.
Closes #17.
Bug. Claude Code 2.1.289 sends a feature probe,
server/discover, beforeinitialize.cua servepassed it through; rmcp 1.5.0 exits on any request beforeinitialize, the connection latchedconnection_failed, and everycua serveregistration showed "Failed to connect".verify.mjsand hand-rolled handshakes start withinitialize, so they never saw it.Fix. Any request other than
initializethat arrives beforeinitializeis answered locally with JSON-RPC-32601and never forwarded. Afterinitialize, rmcp answers the same probe with-32601itself and survives (checked live), so post-initialize unknown methods stay pass-through.Verification.
npm test403/403 (new test: the probe is refused, never reaches the fake upstream, andinitializestill succeeds).initialize→-32601, theninitializeandtools/list(five tools); probe afterinitialize→ rmcp's own-32601, runtime still serving.