claude-code - 💡(How to fix) Fix [BUG] /ide command fails to connect to VS Code when project path contains non-ASCII (Japanese) characters and spaces [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#48980Fetched 2026-04-17 08:54:09
View on GitHub
Comments
1
Participants
2
Timeline
6
Reactions
1
Timeline (top)
labeled ×5commented ×1

Error Message

Error Messages/Logs

No additional error details or stack traces are shown.

Fix Action

Fix / Workaround

  • 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).

Code Example

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

---

> /ide
Failed to connect to Visual Studio Code.
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report
  • 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).

extent analysis

TL;DR

The issue can likely be resolved by ensuring that the project path used by the claude command and the VS Code extension matches, potentially by using a directory junction with an ASCII-only path.

Guidance

  • Verify that the ~/.claude/projects/ directory conversion of non-ASCII characters to hyphens is not causing a path mismatch between the CLI and VS Code extension.
  • Try creating a directory junction with an ASCII-only path using mklink /J and open both VS Code and the terminal from that path to see if it resolves the issue.
  • Check related issues #19972, #36464, and #35582 for potential solutions or workarounds.
  • Ensure that the project path is correctly encoded and handled by the claude command and the VS Code extension.

Example

No code snippet is provided as the issue seems to be related to path handling and encoding rather than a specific code problem.

Notes

The issue is specific to Windows and non-ASCII paths, and the provided workaround using mklink /J may not be verified. The related issues #19972, #36464, and #35582 may provide additional context or solutions.

Recommendation

Apply the workaround of creating a directory junction with an ASCII-only path using mklink /J to see if it resolves the issue, as it is a potential solution that has not been verified yet.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING