[BUG] Working directory path in model context contains mispelling/typo/corruption of username
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 environment information passed to the model at conversation start contains an incorrect username in the working directory path.
Observed behavior:
- Model receives: Working directory: /Users/jdprueet/Desktop/...
- Actual path: /Users/jdpruett/Desktop/...
Note the missing 't' in the username ("jdprueet" vs "jdpruett").
Verification:
All shell commands return the correct username:
$ pwd
/Users/jdpruett/Desktop/
$ echo $HOME
/Users/jdpruett
$ whoami
jdpruett
Impact:
The model uses this incorrect path when constructing absolute file paths, causing "file not found" or "no such directory" errors when using tools like Read or Write with absolute paths.
Environment:
- macOS (Darwin 25.1.0)
- Claude Code CLI
What Should Happen?
Claude should be fed the correct user directory without misspellings.
Error Messages/Logs
Steps to Reproduce
- Start a new Claude Code conversation in any directory:
cd /Users/jdpruett/Desktop/some-project
claude
- Ask Claude to read a file using an absolute path, or ask it to report what working directory it sees:
What is my current working directory according to your context?
- Observe that the model reports an incorrect path with a typo in the username:
- Expected: /Users/jdpruett/Desktop/some-project
- Actual: /Users/jdprueet/Desktop/some-project (missing 't')
- Alternatively, ask Claude to use the Read tool with an absolute path - it will fail with "file not found" because it constructs the path using the incorrect username from its context.
Note: I'm not sure if this is reproducible for all users or specific to certain usernames/system configurations. The corruption appears to happen when the working directory is captured and passed to the model context at conversation start.
Claude Model
Opus
Is this a regression?
No, this never worked
Last Working Version
_No response_
Claude Code Version
2.1.6
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_
Showing cached comments. Read the full discussion on GitHub ↗
11 Comments
Same on
2.1.37 (Claude Code)on Linux. There's also a discussion at https://github.com/anthropics/claude-code/issues/10580 which was auto-closed but still relevant.Using
CLAUDE.mdto prevent this behavior has so far been ineffective:To me, the bigger problem is the use of absolute paths for Read/Write/Bash operations. Claude should use relative paths when working within the project (and it sometimes does, it's very inconsistent)
any update on this?
I'm also experiencing this issue. It should use relative paths, but resorts to using absolute paths and then misspells my username. It should be
jpcanaverdebut it usesjpcanavrede.Same issue here. It sometimes uses absolute paths and misspells my username, replacing
juleswithjuliusleading to _Read_ action errorsFor visibility, the chain of automated duplicate closures points https://github.com/anthropics/claude-code/issues/31984 here. I'm not sure they are the same issue, given
.claireis being experienced by multiple users, it seems Claude sometimes thinks it is Claire.Same here, even CLAUDE.md restrictions on the path usage do not help
I'm experiencing similar issues.
I don't keep my repos in the user directory, but on another drive. Claude code frequently gets the first directory of the path wrong.
The correct path is
E:/Utveckling/Repos/..."Utveckling" is the swedish word for "Development". Claude code tends to translate this word into random languages, which of course results in read errors since the made up path does not exist.
What I've seen so far:
E:/Entwickling/Repos/(Misspelled german. This one is the most common.)E:/Entwickung/Repos/(Also misspelled german.)E:/Udvikling/Repos/(Danish)E:/Världsutveckling/Repos/(Another swedish word, meaning "world development" which has a completely different meaning.)E:/Développing/Repos(French)Is there still no suction for this? Currently Claude Code is pretty useless to me. it doesn't get anything done due to this error. Also I experience the exact same issue with Opus 4.6
the solution...is codex.
I've noticed a very similar issue that has persisted across several versions of claude code now. If the name
julesappears anywhere in the path, subagents change it tojuliusover and over again and ignore instructions to the contrary. It's driving me a bit nuts...Closing for now — inactive for too long. Please open a new issue if this is still relevant.