[BUG] /ide command fails to connect to VS Code when project path contains non-ASCII (Japanese) characters and spaces
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
- Open a project folder whose path contains non-ASCII (e.g., Japanese) characters and/or spaces in VS Code on Windows
- Open a separate external terminal (e.g., Windows Terminal)
cdto the same project directory- Run
claude - Type
/ide - Observe:
Failed to connect to Visual Studio Code.
Contrast with working scenario:
- Open the same project in VS Code
- Open VS Code's integrated terminal
- Run
claude - IDE integration works automatically (no
/ideneeded)
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 —
/idehas 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).
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗