[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_
This issue has 11 comments on GitHub. Read the full discussion on GitHub ↗