anomalyco / anomalyco/opencode

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

Open
#48,196 1 comment 0 reactions 1 assignee View on GitHub

@neriousy is already working on this.

Since Sep 9, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.