Repository navigation
Description
The work
ACP threads fail to start: bb-bridge MCP server is spawned with the bridge worker script instead of the plugin entry point
Environment
- bb: 0.39.0 (macOS, Apple Silicon, Electron distribution)
- Affected provider:
acp-omp(and likely every otheracp-*provider — the faulty code path is in the sharedprovider-acpbridge) - ACP agent:
omp(oh-my-pi) 17.3.7, via Homebrew - OS: macOS (darwin-arm64)
Summary
Starting a new thread with any ACP provider fails at thread.start with a generic
Command thread.start failed / Internal error.
Root cause: when the provider-acp bridge builds the bb-bridge dynamic-tool MCP
server config, resolveBridgeProcessArgsForMcpServer() uses process.argv[1] as the
entry point. Because the plugin now runs inside the generic
bb-provider-bridge-worker.mjs, process.argv[1] resolves to the worker script, not
the plugin's host.js. The spawned "MCP server" is therefore launched without the
arguments the worker expects (plugin host path, plugin id, data dir), exits immediately,
and the ACP agent rejects session/new with bb-bridge: Transport closed.
Steps to reproduce
- Install bb 0.39.0 and an ACP agent (e.g.
omp, which exposesomp acp). - Create a new thread with provider
acp-ompand any model. thread.startfails withInternal error.
Expected vs actual
- Expected: the thread starts; the
bb-bridgeMCP server (used for the built-in
update_environment_directorydynamic tool) is spawned from the plugin's own
host.js --mcp-stdio. - Actual: bb spawns:
{
"name": "bb-bridge",
"command": "/Applications/bb.app/Contents/MacOS/bb",
"args": [
"/Applications/bb.app/Contents/Resources/app.asar.unpacked/node_modules/bb-app/host-daemon/dist/bb-provider-bridge-worker.mjs",
"--mcp-stdio"
]
}Note args[0] is the worker, which requires <host.js> and
does not handle --mcp-stdio. It exits immediately, so the agent's
session/new fails.
Evidence
Traced ACP traffic between the bridge and omp acp shows session/new being rejected:
{"jsonrpc":"2.0","id":2,"error":{"code":-32603,"message":"Internal error","data":{"details":"bb-bridge: Transport closed"}}}bb surfaces only the top-level message (Internal error); data.details is dropped,
which made this hard to diagnose from the UI.
Control experiments (same machine, same omp 17.3.7):
- omp acp driven directly over ACP (initialize → session/new →
session/set_config_option → session/prompt) works, including two concurrent
sessions on the same model — so this is not an agent-side or concurrency limit. - Replaying the exact session/new with the MCP args corrected to
[host.js, "--mcp-stdio"] succeeds (session/new ok, model switch ok). - Replaying it with the worker script as the entry point reproduces
bb-bridge: Transport closed.
Whether the failure surfaces on the first session of a bridge process appears
timing-dependent (we observed one first-session success, then deterministic failures
on subsequent sessions), which matches reports of "one thread works, new threads fail".
Root cause
plugins/provider-acp/src/bridge/tool-proxy-mcp.ts:
function resolveBridgeProcessArgsForMcpServer() {
const entryPoint = process.argv[1]
? resolve(process.argv[1])
: fileURLToPath(import.meta.url);
return [...process.execArgv, entryPoint, "--mcp-stdio"];
}process.argv[1] is only the plugin entry when the plugin runs standalone. Under the
current architecture the daemon launches
bb bb-provider-bridge-worker.mjs <host.js> , so argv[1] is the
worker script. This looks like a regression from the bridge-worker refactor.
Suggested fix
Use the module URL unconditionally — it always points at the plugin bundle:
function resolveBridgeProcessArgsForMcpServer() {
return [...process.execArgv, fileURLToPath(import.meta.url), "--mcp-stdio"];
}Additional issues worth fixing alongside
- Error details are swallowed. The agent returns
error.data.details: "bb-bridge: Transport closed", but neither the UI nor
host-daemon.log surfaces it — both show only Internal error. Please propagate
error.data into the thread error and daemon logs. - This affects every acp-* provider, not just acp-omp: buildSessionMcpServers()
is shared, so any agent that rejects a failed MCP server at session/new will fail
the same way.
Regression note
ACP threads with the same agent worked before the bb 0.39.0 update on this machine;
the first failure timestamps appear immediately after the update.
Why now
ACP threads fail to start: bb-bridge MCP server is spawned with the bridge worker script instead of the plugin entry point
Acceptance criteria
open a new thread use omp
Activity
suiramdev commentedon Aug 19, 2026
Same here 😢
SawyerHood commentedon Aug 19, 2026
Reproduction & root-cause report: https://get-bb.github.io/reports/issues/1918.html
return [...process.execArgv, fileURLToPath(import.meta.url), "--mcp-stdio"];(the bridge's own module URL is the artifact in every launch mode; argv[1] is always the bootstrap now). Verified: repro test fails on d81fee6 and passes with the change, full provider-acp suite (162 tests) and typecheck pass, and an acp-omp thread on the dev instance gets past thread/start. No wire change, so no HOST_DAEMON_PROTOCOL_VERSION bump. Keep a test that actually executes the advertised MCP command (the e…The report has copy-paste repro steps, screenshots where the bug is visual, code permalinks at the base commit, and repro artifacts. It was independently re-run by a second agent (see its Verification section).
Run the ACP bb-bridge MCP server from the bridge module, not the boot…