anthropics / anthropics/claude-code

[BUG]

Open
#95,635 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area:ide bug has repro platform:macos platform:vscode
Dominant language
TypeScript
Stars
147k
Forks
24k
PR merge metrics
PR metrics pending

Description

Preflight Checklist
  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code
What's Wrong?

With Claude Code CLI running in an external terminal (iTerm) connected to VS Code via /ide, and permission mode set to Manual, file edits never open a diff tab in VS Code. Instead, the diff and Yes/No approval prompt render entirely inline in the terminal. This happens even after a complete clean reinstall of both the CLI (native installer) and the VS Code extension, with a confirmed single CLI binary, a fresh and valid IDE lock file, and a confirmed live WebSocket connection to the extension's ide MCP server. Checking VS Code directly while the terminal's approval prompt was still pending confirmed no diff tab ever appears there.

What Should Happen?

Per Anthropic's own docs (code.claude.com/docs/en/ide-integrations, "The built-in IDE MCP server" section), when the CLI is connected to an IDE, file edits in Manual mode should open in the IDE's native diff viewer instead of the terminal, using the local ide MCP server the extension runs. The approval flow should happen in VS Code's diff UI, not purely in-terminal text.

Error Messages/Logs
Error Messages/Logs:
On connect (VS Code Output panel → Claude Code channel):

[info] New WS connection from: /
[info] MCP server connected to transport
[info] [DiagnosticStreamManager] Started streaming diagnostics
[info] Registered diagnostic client: client_3

On every edit attempt, regardless of permission mode:

[info] Closing all diff tabs in the editor...
[info] Closed 0 diff tabs.
[info] [DiagnosticStreamManager] Notifying 1 clients about diagnostics change for 1 files

No log line ever indicates an attempt to open a new diff tab, and no error appears — the sequence just stops after the diagnostics notification. Lock file at ~/.claude/ide/<port>.lock confirmed fresh and correct each time:

json
{"pid":70346,"workspaceFolders":["/Users/adamdemirel/Code/cohort-004-project"],"ideName":"Visual Studio Code","transport":"ws","runningInWindows":false,"authToken":"a38ded7d-7d80-4593-b69c-f66a7ae8e633"}
Steps to Reproduce
  1. Fully removed all prior CLI installs (npm-global leftover + native) and the VS Code extension, including ~/.claude, ~/.local/bin/claude, ~/.local/share/claude, and the extension's globalStorage directory
  2. Fresh native install: curl -fsSL https://claude.ai/install.sh | bash
  3. In iTerm: claude, then /ide — extension auto-installs, reports "Installed extension to VS Code"
  4. Confirmed lock file at ~/.claude/ide/.lock is fresh with correct workspaceFolders, matching PID alive
  5. Set permission mode to Manual
  6. Asked Claude to edit package.json
Claude Model

Sonnet (default)

Is this a regression?

Yes, this worked in a previous version

Last Working Version

No response

Claude Code Version

2.1.278

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

iTerm2

Additional Information

No response

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the /ide connection from iTerm with the VS Code extension, Manual permission mode, and an edit to package.json. Read the IDE MCP server and WebSocket-related logs, especially the sequence that closes diff tabs and notifies diagnostics; done means the edit opens in VS Code's native diff viewer and approval occurs there.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript, vscode
Domain
cli, desktop-dev, devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.