Skip to content

[BUG]: opencode doesn't receive progress notifications from MCP servers #24965

Closed as duplicate

Description

@fahreddinozcan

Description

Description

opencode's MCP client never processes notifications/progress from any
MCP server. Long-running tool calls that rely on progress notifications
to keep the SDK's per-request timer alive (via resetTimeoutOnProgress)
fail with:

MCP error -32001: Request timed out

even when the server is healthy and emitting progress on schedule.

Root Cause

The MCP TypeScript SDK only injects a progressToken into outbound
_meta when options.onprogress is set
(https://github.com/modelcontextprotocol/typescript-sdk/blob/v1.27.1/src/shared/protocol.ts#L1126-L1135).
opencode's client.callTool passes resetTimeoutOnProgress: true but
does not pass onprogress, so:

  • No progressToken is sent to the server, so the server has no token
    to address its progress notifications to.
  • Even if the server emitted a notification with a fabricated token,
    the SDK's _onprogress would early-return on "unknown token" before
    reaching the timer-reset block.

The result is that resetTimeoutOnProgress: true is dead code for any
opencode tool call: the per-request timer fires unconditionally at the
SDK default of 60s, regardless of how often the server emits progress.

Steps to Reproduce

  1. Configure any MCP server that emits notifications/progress during
    a tool call (e.g. a test server that sleeps and emits progress every
    20s).
  2. Invoke the tool from opencode.
  3. Observe that the call times out at -32001 even though the server
    completes the call successfully.

Expected Behavior

opencode should receive and process notifications/progress. With
resetTimeoutOnProgress: true, each notification should reset the
per-request timer, allowing long-running tools to complete.

Plugins

No response

OpenCode version

No response

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

No response

Terminal

No response

Activity

  1. added
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on Apr 29, 2026
  2. github-actions commented on Apr 29, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

  3. removed
    bugSomething isn't working
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on May 3, 2026
  4. arnavranjan005 commented on Jul 1, 2026

    @arnavranjan005

    this bites any server doing long-running work correctly per spec. Good analysis on the onprogress → progressToken chain — without the callback the token never gets injected, so resetTimeoutOnProgress: true is dead code exactly as you said.
    For anyone blocked on this right now: I've been working around the whole class of problem by not holding the tool call open at all — return a job id immediately, stream progress through a separate watcher tool instead (https://github.com/arnavranjan005/mcp-telemetry). Doesn't excuse the client bug, but it sidesteps it, and works the same across opencode / Claude Code / Cursor since it doesn't depend on each host's timeout behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions