feat(remote): honest reverse-MCP logging — declared vs. consumed - #74
Merged
Conversation
The management connection logged "oab tools published" the moment Studio got a sessionId back from session/new — i.e. when Studio *declared* the `oab` server, not when the agent consumed it. So an operator saw "published" while the agent reported no oab tools, with nothing in the Activity log to explain the gap. The tools only appear once the agent (via the gateway) connects back to the declared server over the reverse-MCP tunnel and lists them. Make that observable and fix the wording: - Declaration log: "oab tools published/republished" → "oab server (re-)declared (awaiting agent connect)". Declared ≠ consumed. - Inbound::Connect: log when the agent opens the reverse-MCP tunnel to the oab server — the proof the declaration was consumed. - Inbound::Message: log the reverse-MCP call; for `tools/list`, log the served tool count — the definitive "the agent pulled N oab tools" signal. Now the Activity log distinguishes the two failure modes: no Connect / no tools/list after "declared" ⇒ the gateway/agent runtime isn't tunnelling the reverse direction (upstream); a tools/list served with 0 (or an error) ⇒ a Studio-side issue. Behaviour is unchanged — logging only. No local src-tauri build (its dep tree OOMs this box, as with #69); CI build-test covers the compile. Change is additive logging using patterns already in the file. 🤖 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
The management connection logged "oab tools published" the moment Studio got a
sessionIdback fromsession/new— i.e. when Studio declared theoabserver, not when the agent consumed it. So an operator saw "published" while the connected agent reported no oab tools, with nothing in the Activity log to explain the gap.The
oabdeclaration carries no tools inline — the agent only gets them by connecting back to the declared server over the reverse-MCP tunnel and callingtools/list(which Studio serves from its oab-mcp sidecar). If the agent never connects, no tools — and today that's invisible.What
Honesty + observability, logging only, no behaviour change:
oab tools published/republished→oab server (re-)declared (awaiting agent connect). Declared ≠ consumed.Inbound::Connect— log when the agent opens the reverse-MCP tunnel to the oab server (the proof the declaration was consumed).Inbound::Message— log the reverse-MCP call; fortools/list, log the served tool count — the definitive "the agent pulled N oab tools" signal.Result — the Activity log now distinguishes the two failure modes
Connect/ notools/listafter "declared" ⇒ the gateway / agent runtime isn't tunnelling the reverse direction — upstream (openab), not Studio. (This is the current symptom.)tools/listserved with 0, or an error ⇒ a Studio-side issue (sidecar/tool wiring).Verification
src-tauriisn't built locally (its dep tree — tauri + aws-sdk-ec2/s3 — OOMs this box, as noted on #69); CIbuild-testcovers the compile. The change is additive logging using patterns already in the file (app.emit+json!,and_then(Value::as_array)mirroring the existingValue::as_struses).🤖 Generated with Claude Code