Skip to content

MCP prompts/list polling storm causes 100% CPU and renderer crash (TypeError: Failed to fetch) #27477

Closed

Description

@Philip2050

Issue: MCP prompts/list polling storm causes 100% CPU and renderer crash

Description

OpenCode aggressively polls the prompts/list method on ALL connected MCP servers at startup. Many MCP servers do not implement this method (returning -32601 Method not found), but OpenCode keeps retrying in an aggressive loop. This causes:

  1. 100% CPU usage for 1-3 minutes on startup
  2. Memory spike as MCP connection threads accumulate
  3. HTTP server unresponsiveness - the main process is too busy polling MCPs to respond to renderer HTTP requests
  4. Renderer crash - TypeError: Failed to fetch when oc:// protocol fetch to local API times out

Error Pattern

The log shows hundreds of these errors in milliseconds:

ERROR service=mcp clientName=oh-my-claudecode:t error=MCP error -32601: Method not found failed to get prompts
ERROR service=mcp clientName=mgrep error=MCP error -32601: Method not found failed to get prompts
ERROR service=mcp clientName=comet-bridge error=MCP error -32601: Method not found failed to get prompts
ERROR service=mcp clientName=open-computer-use error=MCP error -32601: Method not found failed to get prompts
ERROR service=mcp clientName=context7 error=MCP error -32601: Method not found failed to get prompts
ERROR service=mcp clientName=chrome-devtools error=MCP error -32601: Method not found failed to get prompts
ERROR service=mcp clientName=zai-mcp-server error=MCP error -32601: Method not found failed to get prompts
ERROR service=mcp clientName=hostinger-mcp error=MCP error -32601: Method not found failed to get prompts
ERROR service=mcp clientName=grep_app error=MCP error -32601: Method not found failed to get prompts

112 prompts/list errors were counted in the latest short-lived log before the crash.

Renderer Crash

The renderer eventually crashes with:

TypeError: Failed to fetch
    at fetch (oc://renderer/assets/main-DlaiLIQY.js:102686:45)
    at request (oc://renderer/assets/main-DlaiLIQY.js:58972:24)
    at async retry (oc://renderer/assets/main-DlaiLIQY.js:63575:14)
    at async fetchMessages (oc://renderer/assets/main-DlaiLIQY.js:65394:24)
    at async loadMessages (oc://renderer/assets/main-DlaiLIQY.js:65418:7)

The fetchMessages function tries to fetch from the local HTTP API via oc:// protocol, but the server is too busy processing MCP polling to respond.

System Info

  • OpenCode v1.14.48
  • Windows 11
  • 8+ MCP servers configured
  • 724MB SQLite database with 771 sessions

Steps to Reproduce

  1. Configure 4+ MCP servers that don't implement prompts/list
  2. Start OpenCode
  3. Observe 100% CPU for 1-3 minutes
  4. Renderer eventually shows Failed to fetch error

Suggested Fix

  1. Add rate limiting or debouncing to prompts/list polling
  2. Cache prompts/list results (MCP servers rarely change their prompts list)
  3. Time out quickly if a MCP server returns -32601 Method not found and stop polling it
  4. Process MCP polling asynchronously so HTTP server requests are not blocked
  5. Consider making prompts/list optional in the MCP spec

Activity

  1. github-actions commented on May 14, 2026

    @github-actions
    Contributor

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

    The root cause you've identified (MCP prompts/list polling storm causing 100% CPU, starving the HTTP server) may be a distinct trigger worth keeping separate, but please review those issues to see if they overlap with your report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    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