Chat history not visible in VS Code/Cursor extension for projects with non-ASCII paths (Unicode NFC/NFD mismatch)

Resolved 💬 2 comments Opened Feb 4, 2026 by vladan-kosut Closed Feb 4, 2026

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 into u + U+030A (combining ring above). The sanitization replaces non-alphanumeric characters with -, but the base letter u survives: MůjM, u, ̊ (combining), jMu-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ůjM, ů (single char, non-ASCII), jM-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

  1. Have a project on a path containing non-ASCII characters (e.g. Google Drive with Czech/German/French folder names)
  2. Open the project in VS Code or Cursor
  3. Start a Claude Code session via the extension — this creates a session .jsonl file in a CLI-sanitized (NFD) directory
  4. Close the session
  5. Try to view chat history in the extension sidebar → empty
  6. Run claude --resume in 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]/.

View original on GitHub ↗

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