feat(remote): richer reverse-MCP + operator logging for troubleshooting - #75
Merged
Conversation
Follow-up to #74. Fills the silent gaps a reviewer hits when the Activity log can't explain a reverse-MCP or turn problem. Logging only, no behaviour change. - A. tools/call outcome: log the tool name + ok / tool-error / failed(+msg), instead of only "a tools/call happened". A failing tool call is the usual troubleshooting case and was invisible. - B. tools/list failure: detect a sidecar error reply and log its message instead of mislabelling it "unexpected shape" (that branch now means a genuinely odd shape, not an error). - C. Inbound::Disconnect: log when the agent tears down the reverse-MCP tunnel to the oab server — symmetric with #74's Connect log; explains "tools vanished" with no error. - D. Unsupported reverse-MCP method: log when the agent calls a method the oab server doesn't serve (replied -32601) — surfaces a capability mismatch. - E. OutMsg::Cancel: log the operator Stop so Activity distinguishes an operator cancel from a gateway cancel or an error drop. The tunnel-message observability is restructured into one match on the inner method (list/call/initialize/other) carrying (level, message); `initialize` stays unlogged (Connect already proves the agent engaged). No local src-tauri build (dep tree OOMs this box, as with #69/#74); CI build-test covers the compile. Additive logging using patterns already in the file (`app.emit` + `json!`, `and_then(Value::as_*)`). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
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.
Why
Follow-up to #74. Fills the silent gaps a reviewer hits when the Activity log can't explain a reverse-MCP or turn problem. Logging only, no behaviour change.
What (A–E)
tools/calloutcome — log the tool name + ok / tool-error / failed (+msg), instead of only "a tools/call happened". A failing tool call is the usual troubleshooting case and was invisible.tools/listfailure — detect a sidecar error reply and log its message, instead of mislabelling it "unexpected shape" (that branch now means a genuinely odd shape, not an error). Surfaces a Studio-side tool problem.Inbound::Disconnect— log when the agent tears down the reverse-MCP tunnel to the oab server — symmetric with feat(remote): honest reverse-MCP logging — declared vs. consumed #74's Connect log; explains "tools vanished" with no error.-32601) — surfaces a capability mismatch.OutMsg::Cancel— log the operator Stop so Activity distinguishes an operator cancel from a gateway cancel or an error drop.The tunnel-message observability is restructured into one
matchon the inner method (tools/list/tools/call/initialize/ other) carrying(level, message);initializestays unlogged (Connect already proves the agent engaged).Not done (flagged in the audit, your call)
Verification
src-tauriisn't built locally (dep tree — tauri + aws-sdk-ec2/s3 — OOMs this box, as on #69/#74); CIbuild-testcovers the compile. Additive logging using patterns already in the file (app.emit+json!,and_then(Value::as_*)).🤖 Generated with Claude Code