Skip to content

fix(remote): echo the client MCP protocol version in the oab initialize - #79

Merged
brettchien merged 1 commit into
mainfrom
fix/reverse-mcp-echo-protocol
Aug 18, 2026
Merged

fix(remote): echo the client MCP protocol version in the oab initialize#79
brettchien merged 1 commit into
mainfrom
fix/reverse-mcp-echo-protocol

Conversation

@brettchien

Copy link
Copy Markdown
Contributor

Root cause — confirmed on a live session (via #77's log)

reverse-MCP initialize — PROTOCOL MISMATCH: client requested 2025-06-18, server answered 2024-11-05
reverse-MCP — client sent initialized (handshake complete)

The reverse-MCP initialize shim answered a hardcoded 2024-11-05. The agent runtime requested 2025-06-18. The client completed the handshake (sent initialized) but then never issued tools/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 protocolVersion instead of pinning one:

let proto = params.get("protocolVersion").and_then(Value::as_str).unwrap_or("2024-11-05");
// … "protocolVersion": proto …

Studio's initialize is a thin shim over the already-initialized oab-mcp sidecar; tools/list / tools/call are forwarded verbatim and their shapes are stable across these versions, so echoing is safe. Fall back to 2024-11-05 only 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 (no PROTOCOL MISMATCH) and a tools/list — served N oab tool(s) line should follow — i.e. the management agent gets its oab tools.

Verification

src-tauri not built locally (dep tree OOMs this box, as on #74/#75/#77); CI build-test covers the compile.

🤖 Generated with Claude Code

…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.
@brettchien
brettchien merged commit 7c610a4 into main Aug 18, 2026
2 checks passed
@brettchien
brettchien deleted the fix/reverse-mcp-echo-protocol branch August 18, 2026 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant