[BUG] /ide command fails to connect to VS Code when project path contains non-ASCII (Japanese) characters and spaces

Resolved 💬 2 comments Opened Apr 16, 2026 by katsuzakitomohiro Closed May 25, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report
  • [x] I am using the latest version of Claude Code

What's Wrong?

When running claude from an external terminal (not VS Code's integrated terminal) and using the /ide command to connect to VS Code, the connection fails with Failed to connect to Visual Studio Code.

This only happens when the project path contains non-ASCII characters (Japanese) and/or spaces. The VS Code extension itself works fine — launching Claude Code from VS Code's integrated terminal provides full IDE integration automatically. The issue is specifically with the /ide command from an external terminal.

Project path (anonymized):

C:\Users\<username>\<日本語の組織名>\ABC_teams - XYZ_<日本語名>\Working\<project-name>

This path contains:

  • Japanese (CJK) characters in multiple segments
  • - (space-hyphen-space) in a folder name
  • Underscores mixed with the above

This type of path is typical when using SharePoint/Microsoft Teams files synced to Windows Explorer via OneDrive. The sync folder names are auto-generated by Microsoft and include the organization name (often in non-ASCII) and team/channel names with spaces and hyphens.

What Should Happen?

/ide should successfully connect to the running VS Code instance regardless of whether the project path contains non-ASCII characters or spaces.

Error Messages/Logs

> /ide
Failed to connect to Visual Studio Code.

No additional error details or stack traces are shown.

Steps to Reproduce

  1. Open a project folder whose path contains non-ASCII (e.g., Japanese) characters and/or spaces in VS Code on Windows
  2. Open a separate external terminal (e.g., Windows Terminal)
  3. cd to the same project directory
  4. Run claude
  5. Type /ide
  6. Observe: Failed to connect to Visual Studio Code.

Contrast with working scenario:

  1. Open the same project in VS Code
  2. Open VS Code's integrated terminal
  3. Run claude
  4. IDE integration works automatically (no /ide needed)

Claude Model

Opus

Is this a regression?

No, this never worked

Claude Code Version

2.1.110 (Claude Code)

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Windows Terminal

Additional Information

  • This issue has persisted since mid-2025. It is not a recent regression — /ide has never worked with this non-ASCII path on Windows in my experience.
  • Windows 11 Pro 10.0.26200
  • Reproduced in both PowerShell 7.6.0 and cmd.exe
  • The ~/.claude/projects/ directory converts non-ASCII characters to hyphens (related: #19972), which may cause a path mismatch between the CLI and VS Code extension when resolving the project identity.
  • Related issues: #36464 (UTF-8 surrogate encoding on Windows with non-ASCII paths), #35582 (VS Code extension fails to detect project with Unicode path)
  • Workaround: Creating a directory junction with an ASCII-only path (mklink /J) and opening both VS Code and the terminal from that path may resolve the issue (not yet verified).

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗