[BUG] Sonnet 4.6 consistently transposes characters in usernames/paths
What's Wrong
Sonnet 4.6 consistently transposes letters in the username bborbe → bborge when constructing file paths (e.g., /Users/bborge/Documents/... instead of /Users/bborbe/Documents/...). This causes Read, Edit, and other file operations to fail with "File does not exist" errors. The transposition is persistent within a session — the model keeps making the same mistake even after seeing correct paths in tool output.
This never happens with Opus 4.5, Opus 4.6, or Sonnet 4.5 — only Sonnet 4.6.
What Should Happen
The model should use the correct username from the environment/paths it has already seen.
Error Messages/Logs
File does not exist. Note: your current working directory is /Users/bborbe/Documents/workspaces/dark-factory.
(File path was constructed as /Users/bborge/... instead of /Users/bborbe/...)
Steps to Reproduce
- User with home directory
/Users/bborbe/(note: b-b-o-r-b-e) - Use Sonnet 4.6 model
- Ask Claude to read/edit files in subdirectories
- Model constructs paths with
/Users/bborge/(transposed r-g-e instead of r-b-e) - Tool calls fail, model may or may not self-correct
Claude Model
claude-sonnet-4-6
Is this a regression?
Yes — Sonnet 4.5 never exhibited this behavior. Opus 4.5 and Opus 4.6 also never make this error. Only Sonnet 4.6.
Claude Code Version
2.1.69 (Claude Code)
Platform
Anthropic API (Max subscription)
Operating System
macOS Darwin 24.6.0
Terminal/Shell
zsh
Additional Information
The transposition bborbe → bborge swaps the 5th character (b → g). It happened repeatedly across multiple file operations in the same session. The correct path appeared in tool outputs, environment context, and working directory — yet the model kept using the transposed version. Switching to Opus 4.6 mid-session immediately resolved it.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗