Chat history not visible in VS Code/Cursor extension for projects with non-ASCII paths (Unicode NFC/NFD mismatch)
Description
The VS Code/Cursor extension does not display chat history for projects whose paths contain non-ASCII characters (e.g. Czech diacritics like ů, á, í, é). The CLI (claude --resume) shows history correctly for the same projects.
Root Cause
The CLI and the extension use different path sanitization methods, producing different directory names under ~/.claude/projects/.
- CLI receives paths from macOS in NFD (decomposed) Unicode form. For example,
ůis decomposed intou+ U+030A (combining ring above). The sanitization replaces non-alphanumeric characters with-, but the base letterusurvives:Můj→M,u,̊(combining),j→Mu-j
- Extension (Node.js) receives paths in NFC (composed) form from the IDE and sanitizes using
/[a-zA-Z0-9]/regex, which treats any non-ASCII character (including composed diacritics) as non-alphanumeric:Můj→M,ů(single char, non-ASCII),j→M-j
This means the CLI creates a directory with one name, but the extension looks for a different directory name → readdir() fails → empty history.
Example
Project path: /Users/me/Library/CloudStorage/GoogleDrive-user@gmail.com/Můj disk/!! Podnikání/klienti/SimplyHoras
| Source | Sanitized directory name |
|--------|--------------------------|
| CLI (NFD) | ...-Mu-j-disk----Podnika-ni--klienti-SimplyHoras |
| Extension (NFC) | ...-M-j-disk----Podnik-n--klienti-SimplyHoras |
Steps to Reproduce
- Have a project on a path containing non-ASCII characters (e.g. Google Drive with Czech/German/French folder names)
- Open the project in VS Code or Cursor
- Start a Claude Code session via the extension — this creates a session
.jsonlfile in a CLI-sanitized (NFD) directory - Close the session
- Try to view chat history in the extension sidebar → empty
- Run
claude --resumein terminal → history shows correctly
Environment
- macOS 15.7.3 (Darwin 24.6.0), Apple Silicon
- Cursor IDE (but likely affects VS Code too)
- Claude Code extension 2.1.27 and 2.1.31 (both affected)
- Google Drive for Desktop (CloudStorage mount) — but the issue is not Google Drive specific, any path with diacritics would trigger it
Workaround
Create a symlink from the Node.js-sanitized name to the CLI-created directory:
# 1. Find the actual directory (created by CLI):
ls ~/.claude/projects/ | grep <project-name>
# 2. Generate the Node.js-sanitized name:
node -e "const p = '<full project path>'; console.log(p.split('').map(c => /[a-zA-Z0-9]/.test(c) ? c : '-').join(''));"
# 3. Create symlink:
ln -s ~/.claude/projects/<CLI-name> ~/.claude/projects/<NodeJS-name>
# 4. Restart the extension
Suggested Fix
Normalize the path to NFD before sanitization in the extension's jv() function (or equivalent), so it matches the CLI behavior:
// Before sanitization, add:
const normalizedPath = workspacePath.normalize('NFD');
// Then sanitize normalizedPath instead of workspacePath
Alternatively, use a Unicode-aware alphanumeric check instead of /[a-zA-Z0-9]/.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗