Skip to content

Send MCP progress during ACP dynamic tool calls so AskUserQuestion does not time out - #1945

Merged
SawyerHood merged 1 commit into
mainfrom
bb/reproduce-and-fix-reported-issue-thr_scbf6inpv6
Aug 19, 2026
Merged

SawyerHood merged 1 commit into
mainfrom
bb/reproduce-and-fix-reported-issue-thr_scbf6inpv6

Conversation

@SawyerHood

Copy link
Copy Markdown
Collaborator

What was wrong

The bb-bridge MCP server that exposes bb's dynamic tools to ACP agents answered tools/call only when the plugin tool returned. OpenCode (and other agents on the MCP TypeScript SDK) fail a request after 60 seconds unless the server sends notifications/progress for the call's progressToken. AskUserQuestion waits on the user for minutes, so the agent got MCP error -32001: Request timed out, reported that the user did not answer, and the later answer went nowhere. Issue: #1944.

What changed

  • plugins/provider-acp/src/bridge/tool-proxy-mcp.ts: when a tools/call request carries _meta.progressToken, the server sends a notifications/progress heartbeat every 15 seconds until the bridge round trip settles. Requests without a token behave as before.
  • BB_ACP_DYNAMIC_TOOL_PROGRESS_INTERVAL_MS is an internal env override that the test uses to shrink the interval. The ACP bridge never sets it.
  • plugins/provider-acp/package.json: @modelcontextprotocol/sdk as a devDependency so the test drives the server with the real client that OpenCode uses.

No wire change between server and daemon.

How you verified

  • New plugins/provider-acp/src/bridge/tool-proxy-mcp.test.ts: real MCP SDK Client over stdio with resetTimeoutOnProgress: true, onprogress, and a 1 s timeout, against the --mcp-stdio server and a fake bridge socket that answers after 2.5 s. Before the fix it fails with MCP error -32001: Request timed out; after the fix the call returns the answer and progress notifications arrive.
  • pnpm exec turbo run typecheck test --filter=bb-plugin-provider-acp: 166 tests pass.

Fixes #1944

AGENT GENERATED: by Claude Opus 5

…tion does not time out

The bb-bridge MCP server answered tools/call only when the plugin tool
returned. OpenCode's MCP SDK client fails a request after 60 seconds unless
notifications/progress resets its timer, so any AskUserQuestion answer
slower than a minute was lost. The server now emits a progress heartbeat
for the call's progressToken every 15 seconds until the call settles.

Fixes #1944

Co-Authored-By: Claude <[email protected]>
@SawyerHood
SawyerHood merged commit e7ff2d3 into main Aug 19, 2026
12 checks passed
@SawyerHood
SawyerHood deleted the bb/reproduce-and-fix-reported-issue-thr_scbf6inpv6 branch August 19, 2026 19:38
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.

ACP (OpenCode): AskUserQuestion tool call times out after 60s, answer is lost

1 participant