Skip to content

opencode mcp list hangs when plugins are enabled; --pure completes #43484

Description

@RaviTharuma

opencode mcp list hangs when plugins are enabled; --pure completes

Summary

opencode mcp list hangs indefinitely with plugins enabled. The same command with --pure finishes in a bounded time and lists servers, including a remote HTTP MCP that is connected.

Observed: hang longer than 80s; a 22s timeout was not enough to complete the plugin-enabled path.

Reproduction

  1. Enable plugins (default / non-pure mode).
  2. Run opencode mcp list.
  3. Observe: the command never returns (waited >80s).
  4. Run opencode --pure mcp list.
  5. Observe: completes in under 20s. The intended remote HTTP MCP is connected. Other unrelated servers fail with SSE Non-200 403. Listing still completes.

No custom MCP URLs or credentials are required to discuss the hang: the --pure run already shows mixed success/failure without blocking.

Expected

mcp list should:

  • Apply a per-server connect timeout (including HTTP and SSE transports).
  • Continue listing remaining servers if one server is slow, unauthenticated, or returns 403.
  • Never wait forever on a single plugin hook or MCP handshake.

--pure currently unblocks listing; the plugin-enabled path should be equally bounded.

Hypothesis

Plugin-enabled mcp list waits forever on a slow or auth-failing MCP (or a plugin hook that talks to one) instead of enforcing per-server timeouts. --pure skips that path, so mixed SSE 403s do not stall the command.

Ask

  1. Per-server connect timeout on mcp list (plugin-enabled and --pure).
  2. One failed or hung server must not block listing the rest.
  3. If a plugin hook participates in MCP discovery, it should inherit the same timeout and isolation.

Environment (anonymized)

  • OpenCode CLI (opencode mcp list / opencode --pure mcp list)
  • Mix of remote HTTP MCP and SSE servers
  • Plugins enabled vs --pure

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