IDE detection fails when path contains Unicode characters (NFD vs NFC normalization)

Resolved 💬 1 comment Opened Jan 11, 2026 by u16943 Closed Feb 6, 2026

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?

The /ide command fails to match a running VS Code instance even when both Claude Code CLI and VS Code are running in the exact same directory. The error
message is confusing because it shows the IDE at the correct path but claims they don't match:

No available IDEs detected. Make sure your IDE has the Claude Code extension or plugin installed and is running.
Found 1 other running IDE(s). However, their workspace/project directories do not match the current cwd.

• Visual Studio Code: /Users/username/CloudSync/Persönlich/Projects/my-project

Root Cause

The path contains a German umlaut ("ö" in "Persönlich"). macOS uses NFD (decomposed Unicode) for filesystem paths, while VS Code likely reports paths in NFC
(composed Unicode).

When comparing paths as raw strings without Unicode normalization, they don't match even though they represent the identical path:
┌──────────────────┬────────────────────────────────────────┬──────────┐
│ Normalization │ Representation │ Length │
├──────────────────┼────────────────────────────────────────┼──────────┤
│ NFD (decomposed) │ o + combining umlaut (U+006F + U+0308) │ 64 chars │
├──────────────────┼────────────────────────────────────────┼──────────┤
│ NFC (composed) │ ö (U+00F6) │ 63 chars │
└──────────────────┴────────────────────────────────────────┴──────────┘
Verification:
import os
import unicodedata

cwd = os.getcwd() # macOS returns NFD
nfc = unicodedata.normalize('NFC', cwd)
nfd = unicodedata.normalize('NFD', cwd)

print(f'CWD == NFC: {cwd == nfc}') # False
print(f'CWD == NFD: {cwd == nfd}') # True
print(f'NFC == NFD: {nfc == nfd}') # False (but same path!)

Environment

  • OS: macOS Darwin 25.2.0
  • Claude Code version: Latest (as of 2025-01-11)
  • IDE: Visual Studio Code with Claude Code extension
  • Path: Contains German umlaut "ö" in directory name

What Should Happen?

IDE detection should normalize both paths (to NFC or NFD) before comparing them, so paths with Unicode characters match correctly.

Suggested Fix

Before comparing the current working directory with the IDE's workspace path, normalize both to the same Unicode form:

import { normalize } from 'path';

function normalizePath(p: string): string {
// Normalize filesystem path
const normalized = normalize(p);
// Normalize Unicode to NFC for consistent comparison
return normalized.normalize('NFC');
}

// Then compare:
if (normalizePath(cwd) === normalizePath(ideWorkspace)) {
// Match!
}

Error Messages/Logs

Steps to Reproduce

  1. Create a directory path containing a non-ASCII Unicode character (e.g., German umlaut):

mkdir -p ~/CloudSync/Persönlich/Projects/my-project
cd ~/CloudSync/Persönlich/Projects/my-project

  1. Open VS Code in that directory:

code .

  1. Ensure the Claude Code extension is installed and active in VS Code
  2. Open a terminal and navigate to the same directory:

cd ~/CloudSync/Persönlich/Projects/my-project

  1. Run Claude Code and try to connect to the IDE:

claude
/ide

  1. Result: VS Code is listed as "Found 1 other running IDE(s)" but marked as not matching the current cwd, even though both paths are identical visually.

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.1.4 Claude Code

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗