[BUG] CLI diffs never appear in VS Code — MCP bridge returns "Method not found" (-32601)
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?
When using Claude Code CLI in WSL2 alongside VS Code (Remote - WSL), file diffs from the CLI never appear in the VS Code editor. /ide reports "Connected to Visual Studio Code" but the
connection is effectively dead — diffs never show up regardless of how many times you reconnect.
Chat history only sync on VSCDOE window reload and stop syncing immediately after.
The extension logs reveal the cause: MCP server "claude-vscode" Failed to fetch tools: MCP error -32601: Method not found. This error fires on every session start. The WebSocket connects and
the lock file is created correctly, but the actual MCP method calls fail silently. The CLI has no idea the bridge is broken and keeps reporting "Connected."
I also found that the CLAUDECODE=1 env var leaks into VS Code when launching it from inside a CLI session (code .), causing the extension's spawned processes to crash with "Claude Code cannot
be launched inside another Claude Code session." This is a separate failure mode but makes debugging harder since users naturally launch VS Code from their terminal.
What Should Happen?
[ERROR] MCP server "claude-vscode" Failed to fetch tools: MCP error -32601: Method not found
Failed to check enabledPlatforms: TypeError: undefined is not an object (evaluating 'd_.join')
Error: Claude Code cannot be launched inside another Claude Code session.
Error Messages/Logs
This error appears on every session start (Output → Claude Code):
[ERROR] MCP server "claude-vscode" Failed to fetch tools: MCP error -32601: Method not found
## Additional Context
- The extension activates successfully, authenticates, and the sidebar panel works
- The MCP server starts on the expected port
- `/ide` connects at the socket level, but the MCP protocol calls fail silently
- Tested across 20+ edits, multiple `/ide` reconnections, VS Code window reloads,
and launching VS Code from WSL with `code .`
- Also confirmed `CLAUDECODE=1` env var leaks into VS Code when launched from
within a CLI session (`code .`), causing nested session detection errors in
earlier attempts — though clearing this did not fix the MCP error
Steps to Reproduce
- Open VS Code connected to WSL2 via Remote - WSL extension
- Open a terminal in WSL (external, not VS Code integrated terminal)
- Run claude in a project directory
- Run /ide — it reports "Connected to Visual Studio Code"
- Ask Claude to edit any file (e.g. "add a line to test.txt")
- The file is modified on disk but no diff appears in VS Code
- Check VS Code Output panel → Claude Code — you'll see the MCP -32601 error
Claude Model
Not sure / Multiple models
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.49 and 2.1.50
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
Windows Terminal
Additional Information
- File modified on disk after CLI edit: yes
- VS Code Source Control detects change: yes (file watcher works fine)
- Diff appears in VS Code editor with auto-approved Edit/Write: no
- Diff appears in VS Code editor with Edit/Write in ask mode: no
- Diff appears in CLI terminal with Edit/Write in ask mode: yes
- MCP server running on expected port: yes (lock file present with correct auth token)
- MCP tool fetch succeeds: no — Method not found (-32601)
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗