[BUG] Sonnet 4.6 consistently transposes characters in usernames/paths

Resolved 💬 3 comments Opened Mar 6, 2026 by bborbe Closed Mar 9, 2026

What's Wrong

Sonnet 4.6 consistently transposes letters in the username bborbebborge 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

  1. User with home directory /Users/bborbe/ (note: b-b-o-r-b-e)
  2. Use Sonnet 4.6 model
  3. Ask Claude to read/edit files in subdirectories
  4. Model constructs paths with /Users/bborge/ (transposed r-g-e instead of r-b-e)
  5. 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 bborbebborge swaps the 5th character (bg). 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.

View original on GitHub ↗

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