Repository navigation
Description
The problem
scripts/probe-harness.sh cannot test whether ai-buddy's MCP server reaches a Harness, and it does not say so. Every per-Harness claim in the README's tools table was measured through it.
Why
--probe-harness returns at src-tauri/src/main.rs:2959. mcp_http::serve is called at :3144, during app startup, 185 lines later. So on the probe path mcp_http::endpoint() is None.
choose_mcp at src-tauri/src/harness.rs:1570 then does this:
- The HTTP branch needs
handshake.mcp_httpand an endpoint. The endpoint isNone, so it is skipped even for a Harness that advertises http. - It falls through to stdio, where
launch.env = endpoint.map(stdio_env).unwrap_or_default()leaves an empty environment.
--mcp-stdio is a shim that dials the running app (ADR-0026). Without AI_BUDDY_MCP_URL it exits immediately. Run by hand it answers:
{"jsonrpc":"2.0","id":1,"error":{"code":-32603,"message":"AI_BUDDY_MCP_URL is unset: ai-buddy is not running, or this Harness dropped the environment it was given"}}
So every probe hands its Harness a server that cannot start, and the Harness correctly shows no ai-buddy tools.
Why it matters
The probe prints mcp http true next to the stdio shim it actually sent, which reads as though MCP were wired up. It is not.
This produced a wrong conclusion once already. A Goose session reported NO SUCH TOOL for describe_screen, on a resumed session and on a genuinely fresh one, and I read that as Goose ignoring the mcpServers field ACP defines on session/new. It was the probe. Goose would have behaved like any other Harness. That inference reached a PR description and a review before it was caught.
What to change
Have the probe stand up the endpoint before it attaches, so choose_mcp takes the same branch the app takes. mcp_http::serve returns the Endpoint and takes an mpsc::Sender<Call>; the probe needs a receiver that answers calls, which can be as small as dispatching through the same path the app uses.
If that is more than the probe should carry, the alternative is to make the limitation loud: have the probe say that no MCP endpoint is served and that any tool claim is therefore untested. Silence is what caused the wrong conclusion.
The rows this casts doubt on
Anything in the README's per-Harness tools table that asserts something about ai-buddy's MCP arriving or not arriving. README.md:172 says pi "does not receive ai-buddy's MCP". That is tracked separately, but it is the same measurement.
— Claude Code agent, on @omesser's behalf.
Metadata
Metadata
Assignees
Labels
Projects
- StatusShow more project fieldsDone
Activity
omesser commentedon Sep 24, 2026
Hygiene after #986
#986 merged on main (
fc5503f8). Docs only: the Goose tools row now reports a measured MCP delivery (HTTP, sevenai-buddy__*tools listed), and a note under the table points at this issue for the probe's missing endpoint.Done (docs): the wrong "not measured" Goose claim is gone; the README now names this issue as the probe limit.
Still open (this issue): the probe still starts no MCP endpoint. The Goose row reads from a patched local run, not from stock
scripts/probe-harness.sh. Until the probe stands upmcp_http::serve(or the loud-probe alternative lands in the script itself), tool claims for other Harnesses remain the same untested shape.Leaving this open. #985 still tracks the
pirow separately.— Cursor agent (Coder), on @omesser's behalf.
omesser commentedon Sep 24, 2026
The throwaway patch that produced the evidence behind #986, recorded here before I prune the worktree it lived in.
It does two things to
src-tauri/src/harness.rs: stands upmcp_http::serveinsiderun_probewith a channel that answers every call, and swapsPROBE_PROMPTfor a tool-list request. With it, the probe printsmcp http://127.0.0.1:59997/mcpand Goose answers with its own eighteen tools plus the sevenai-buddy__*ones. Without it,endpoint()isNone,choose_mcpskips the HTTP branch, and every Harness gets a stdio shim with an empty environment.It is not the fix. It logs calls to stderr and answers them with a stub, so it proves delivery and nothing else. The real fix has to decide what the probe answers a tool call with, and whether a probe run should serve the endpoint always or behind a flag.
— Claude Code agent, on @omesser's behalf.
docs(director): Name the bare `ai-buddy__` prefix too
omesser commentedon Sep 26, 2026
Shipped on main via #1035 (
8588715).Done (acceptance met): the probe serves
mcp_http::servebefore attach, answers calls through the samedispatchthe frame loop uses, and printsmcp listed/mcp call. Stockscripts/probe-harness.shnow takes the same MCP branch the app takes. README anddocs/DEVELOPMENT.mddescribe the new lines; the unit test asserts an http-advertising Harness gets the loopback URL.Measured on the PR: Goose / Codex / Copilot fetched
tools/listover HTTP; Pi was handed stdio and never asked (separate from this fix —pi-acpdoes not passsession/newservers topi, see #1019).Closing as completed (already closed by the merge keyword).
— Cursor agent (Coder), on @omesser's behalf.