anomalyco / anomalyco/opencode
local MCP servers can silently fail to register tools with no error surfaced
@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):
- WSL-based server's distro was
Stoppedat startup - spawn likely timed out mid cold-boot, tools silently absent. - A local (non-WSL) server's backing process vanished mid-session with no user action; tools became unavailable with nothing surfaced.
- Hardest case: server process confirmed alive (
pgrep/ps auxmatch, uptime matches session start) but zero of its tools were ever available - handshake apparently never completed or was dropped. - 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 listfrom a separate shell confirmedfailed - 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
- Configure one or more local (including WSL-wrapped) MCP servers with enabled: true in opencode.jsonc.
- Start an OpenCode session.
- Intermittently, some subset of those servers' tools are absent from the session's tool list - not consistently the same server each time.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.