fix(remote): echo the client MCP protocol version in the oab initialize - #79
Merged
Conversation
…lize Confirmed by the #77 log on a live management session: reverse-MCP initialize — PROTOCOL MISMATCH: client requested 2025-06-18, server answered 2024-11-05 The reverse-MCP `initialize` shim answered a hardcoded `2024-11-05`. The agent runtime requested `2025-06-18`; the downgrade is why it completed the handshake (sent `initialized`) yet never issued `tools/list` — so the management agent saw no oab tools. Echo the client's requested `protocolVersion` instead of pinning one. Our initialize is a thin shim over the already-initialized oab-mcp sidecar, and `tools/list`/`tools/call` are forwarded verbatim (the response shape is stable across these versions), so echoing is safe; fall back to `2024-11-05` only when the client omits a version. With this, the #77 log should read "client requested X, server answered X" (no mismatch) and `tools/list` should follow — confirming the fix on the live session. No local src-tauri build (dep tree OOMs this box); CI build-test covers the compile.
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.
Root cause — confirmed on a live session (via #77's log)
The reverse-MCP
initializeshim answered a hardcoded2024-11-05. The agent runtime requested2025-06-18. The client completed the handshake (sentinitialized) but then never issuedtools/list— so the management agent saw no oab tools. The version downgrade is the cause.(#77 was logging-only, on purpose — it confirmed this hypothesis. This PR is the actual fix.)
Fix
Echo the client's requested
protocolVersioninstead of pinning one:Studio's
initializeis a thin shim over the already-initializedoab-mcpsidecar;tools/list/tools/callare forwarded verbatim and their shapes are stable across these versions, so echoing is safe. Fall back to2024-11-05only when the client omits a version.How we'll know it worked
After deploy, the #77 log should read
client requested X, server answered X(noPROTOCOL MISMATCH) and atools/list — served N oab tool(s)line should follow — i.e. the management agent gets its oab tools.Verification
src-taurinot built locally (dep tree OOMs this box, as on #74/#75/#77); CIbuild-testcovers the compile.🤖 Generated with Claude Code