Skip to content

feat(remote): honest reverse-MCP logging — declared vs. consumed - #74

Merged
brettchien merged 1 commit into
mainfrom
feat/reverse-mcp-observability
Aug 18, 2026
Merged

feat(remote): honest reverse-MCP logging — declared vs. consumed#74
brettchien merged 1 commit into
mainfrom
feat/reverse-mcp-observability

Conversation

@brettchien

Copy link
Copy Markdown
Contributor

Why

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 connected agent reported no oab tools, with nothing in the Activity log to explain the gap.

The oab declaration carries no tools inline — the agent only gets them by connecting back to the declared server over the reverse-MCP tunnel and calling tools/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:

  • Declaration logoab tools published/republishedoab 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.

Result — the Activity log now distinguishes the two failure modes

  • No Connect / no tools/list after "declared" ⇒ the gateway / agent runtime isn't tunnelling the reverse direction — upstream (openab), not Studio. (This is the current symptom.)
  • tools/list served with 0, or an error ⇒ a Studio-side issue (sidecar/tool wiring).

Verification

src-tauri isn't built locally (its dep tree — tauri + aws-sdk-ec2/s3 — OOMs this box, as noted on #69); CI build-test covers the compile. The change is additive logging using patterns already in the file (app.emit + json!, and_then(Value::as_array) mirroring the existing Value::as_str uses).

🤖 Generated with Claude Code

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)
@brettchien
brettchien merged commit cd5cf91 into main Aug 18, 2026
2 checks passed
@brettchien
brettchien deleted the feat/reverse-mcp-observability branch August 18, 2026 01:16
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