diff --git a/plugins/provider-acp/src/bridge/bridge.ts b/plugins/provider-acp/src/bridge/bridge.ts index 40d7638c8..9e17152b6 100644 --- a/plugins/provider-acp/src/bridge/bridge.ts +++ b/plugins/provider-acp/src/bridge/bridge.ts @@ -326,9 +326,11 @@ function emitSessionError(session: AcpThreadSession, message: string): void { } function resolveBridgeProcessArgsForMcpServer(): string[] { - const entryPoint = process.argv[1] - ? resolve(process.argv[1]) - : fileURLToPath(import.meta.url); + // The bridge module itself (the `bb.host` artifact, or bridge.ts from + // source), never process.argv[1]: since the provider-bridge bootstrap spawns + // every bridge, argv[1] is the bootstrap, whose argv contract rejects + // `--mcp-stdio` and exits before serving a single tool. + const entryPoint = fileURLToPath(import.meta.url); return [...process.execArgv, entryPoint, "--mcp-stdio"]; }