[Bug] Project memory path case mismatch between system prompt and disk directory

Resolved 💬 3 comments Opened Mar 26, 2026 by EgorBEremeev Closed Apr 25, 2026

Bug Description
The project memory path shown in the system prompt does not match the actual directory on disk. The drive letter prefix in the project directory name is capitalized in the system prompt (C--) but lowercase on disk (c--).

Reproduction

Platform: Windows 10 Pro (10.0.19045), Claude Code via VSCode extension, Git Bash shell

Working directory: C:\git\ai-p_sandbox

  1. Open Claude Code in a project
  2. The system prompt injects:

``
C:\Users\eerem\.claude\projects\C--git-ai-p-sandbox\memory\
``

  1. The actual directory created on disk:

``
c:\Users\eerem\.claude\projects\c--git-ai-p-sandbox\memory\
``

Verified with:

$ ls -d "$HOME/.claude/projects/"*ai-p*
/c/Users/eerem/.claude/projects/c--git-ai-p-sandbox/

Impact

  • Windows (case-insensitive FS): Works by accident — reads/writes hit the correct directory despite the case mismatch. But the path displayed to the user (and to the model) is technically wrong.
  • Linux / WSL (case-sensitive FS): Potentially breaking. If the same path derivation logic is used:
  • Write tool could create a second directory with wrong case (C-- alongside c--)
  • Memory reads from the injected path would miss existing files in the real directory
  • The model would confidently use the wrong path, unaware of the mismatch

Root cause (guess)

The project directory name is derived from the working directory path. It appears the directory is created with one casing (preserving original or lowercasing the drive letter → c--), but the path injected into the system prompt is generated separately and capitalizes the drive letter → C--.

Expected behavior

The path in the system prompt should exactly match the path on disk.

Environment Info

  • Platform: win32
  • Terminal: vscode
  • Version: 2.1.84
  • Feedback ID: 16331036-b884-4be0-9e10-63f324ab0584

Errors

[]

View original on GitHub ↗

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