Skip to content

local MCP servers can silently fail to register tools with no error surfaced #48196

Description

@bradross88

Description

Local MCP servers (including WSL-wrapped ones) intermittently fail to register their tools with the active session, with no error or warning surfaced anywhere.

Observed failure modes (3 separate incidents, 2 sessions/users):

  1. WSL-based server's distro was Stopped at startup - spawn likely timed out mid cold-boot, tools silently absent.
  2. A local (non-WSL) server's backing process vanished mid-session with no user action; tools became unavailable with nothing surfaced.
  3. Hardest case: server process confirmed alive (pgrep/ps aux match, uptime matches session start) but zero of its tools were ever available - handshake apparently never completed or was dropped.
  4. Most recently: a WSL-wrapped server (bdb) served at least one tool call successfully, then its backing process exited entirely with nothing surfaced; opencode mcp list from a separate shell confirmed failed - Operation timed out after 30000ms.

Expected: if a configured, enabled MCP server fails to spawn, times out, or exits, OpenCode should surface a visible warning/error rather than silently dropping its tools.

Actual: tool list silently omits the server. The only way to notice is calling one of its tools and getting a "not available" error, or checking OS processes independently.

Also noted: no CLI-level recovery exists today - opencode mcp only has add/list/auth/logout/debug, no restart/reconnect. A dead server currently requires a full OpenCode restart to recover. Requesting opencode mcp restart <name> (or similar) alongside the fix.

Plugins

none

OpenCode version

1.18.26

Steps to reproduce

  1. Configure one or more local (including WSL-wrapped) MCP servers with enabled: true in opencode.jsonc.
  2. Start an OpenCode session.
  3. Intermittently, some subset of those servers' tools are absent from the session's tool list - not consistently the same server each time.
  4. No error, warning, or log entry is surfaced to the user indicating a registration failure occurred.

Screenshot and/or share link

No response

Operating System

Windows 11

Terminal

No response

Activity

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