Skip to content

MCP prompts/list -32601 causes infinite npx process spawning and UI freeze #26012

Closed

Description

@cy574

Description

When opening a new session or switching to a new workspace folder, OpenCode sends prompts/list requests to all configured local MCP servers. Servers that don't support this protocol method (playwright MCP, zai-mcp-server) return error -32601 (Method not found).

OpenCode retries these requests indefinitely, each time forking a new npx child process under opencode-cli.exe. Across 10+ session restarts in a single day, this accumulates into:

  • 13× duplicate npx @playwright/mcp@latest processes (each wrapped by a separate cmd.exe)
  • 13× duplicate npx -y @z_ai/mcp-server processes
  • 5+ PowerShell/CMD wrapper processes
  • 37 total child processes, 514 handles, 58 threads
  • Sidecar memory: 855MB+

This causes:

  1. Built-in terminal becomes unresponsive (cannot type)
  2. Switching to a new folder session hangs indefinitely
  3. Archiving sessions freezes the UI
  4. Existing sessions that already initialized their MCP connections work normally

Log files at %APPDATA%\ai.opencode.desktop\logs\ contain hundreds of:

Plugins

@tarquinen/opencode-dcp@latest oh-my-openagent@latest

OpenCode version

Desktop: v1.14.39 CLI: v1.14.33

Steps to reproduce

  1. Configure 2+ local MCP servers in opencode.json that use npx (e.g., playwright: npx @playwright/mcp@latest, zai-mcp-server: npx -y @z_ai/mcp-server)
  2. Launch OpenCode desktop app
  3. Open a new workspace folder session (NOT an existing session that already initialized)
  4. Wait 2-3 minutes, then open Task Manager → observe duplicate npx processes accumulating under opencode-cli.exe
  5. Try using the built-in terminal or switching to another session → observe freeze/unresponsiveness
  6. Check %APPDATA%\ai.opencode.desktop\logs\ for "MCP error -32601" spam

Screenshot and/or share link

N/A — log evidence available at %APPDATA%\ai.opencode.desktop\logs
Crash dump: %LOCALAPPDATA%\CrashDumps\OpenCode.exe.42804.dmp

Operating System

Windows 11 Pro 10.0.26200

Terminal

OpenCode built-in terminal (PowerShell 5.1 backend)

Activity

  1. github-actions commented on May 6, 2026

    @github-actions
    Contributor

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

    Your issue adds important detail about the npx child process accumulation and the specific memory/handle counts, which may be worth keeping if the above issues don't fully capture that angle. Please review the linked issues and consider whether this can be tracked there instead.

  2. cy574 commented on May 14, 2026

    @cy574
    Author

    在最新版opencode中该问题已经完全解决

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