[BUG] VS Code IDE MCP getDiagnostics hangs indefinitely after WebSocket connection drops
Resolved 💬 2 comments Opened Dec 7, 2025 by ANA-MAEDA-KENTARO Closed Dec 9, 2025
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
The mcp__ide__getDiagnostics tool hangs indefinitely when the WebSocket connection between Claude Code CLI and the VS Code extension drops. The tool does not timeout and continues waiting for a response for hours, causing Claude Code to freeze completely and become unresponsive.
Found 18+ occurrences in debug logs. In one case, the tool was stuck for 29001 seconds (~8 hours) without timing out.
What Should Happen?
- getDiagnostics should timeout after a reasonable period (e.g., 30-60 seconds)
- When WebSocket connection drops, pending MCP calls should be cancelled or fail gracefully
- Claude Code should remain responsive and continue working without IDE integration if the connection fails
Error Messages/Logs
Error Messages/Logs
2025-12-0XT00:00:00.000Z [DEBUG] MCP server "ide": WS-IDE connection dropped after 0s uptime
2025-12-0XT00:00:00.000Z [DEBUG] MCP server "ide": Calling MCP tool: getDiagnostics
2025-12-0XT00:00:30.000Z [DEBUG] MCP server "ide": Tool 'getDiagnostics' still running (30s elapsed)
2025-12-0XT00:01:00.000Z [DEBUG] MCP server "ide": Tool 'getDiagnostics' still running (60s elapsed)
...
2025-12-0XT08:03:21.000Z [DEBUG] MCP server "ide": Tool 'getDiagnostics' still running (29001s elapsed)
Steps to Reproduce
Steps to Reproduce
- Open VS Code with Claude Code extension installed
- Start Claude Code CLI in the integrated terminal or external terminal
- Use Claude Code normally for a while
- Wait for the IDE WebSocket connection to drop (can happen due to VS Code reload, extension restart, or connection instability)
- Send a prompt to Claude Code that triggers getDiagnostics call
- Claude Code hangs indefinitely without responding
Claude Model
Opus
Is this a regression?
Yes, this worked in a previous version
Last Working Version
2.0.58
Claude Code Version
2.0.60
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
VS Code integrated terminal
Additional Information
VS Code Environment:
- Version: 1.106.3
- Commit: bf9252a2fb45be6893dd8870c0bf37e2e1766d61
- Date: 2025-11-25T22:28:18.024Z
- Electron: 37.7.0
- Chromium: 138.0.7204.251
- Node.js: 22.20.0
- V8: 13.8.258.32-electron.0
Related Issues:
- Related to but distinct from #3085 (JetBrains IDE timeout)
- Related to but distinct from #10813 (IntelliJ specific)
Suggested Fix:
- Implement a timeout mechanism for getDiagnostics calls (e.g., 30-60 seconds max)
- Cancel all pending MCP requests when WebSocket connection drops
- Fail gracefully and allow Claude Code to continue without IDE integration
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗