[BUG] Claude Code repeatedly uses /home/Josep (capital J) instead of /home/josep (lowercase j) when constructing file paths

Resolved 💬 3 comments Opened Apr 4, 2026 by joseppco Closed Apr 8, 2026

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?

This is recurrent problem already reported for example here
https://github.com/anthropics/claude-code/issues/27777
Impact: Edit/Read tool calls fail because the path doesn't exist; requires repeated manual correction

  • Workaround used: Had to add HOME_DIR: /home/josep and USERNAME: josep (lowercase, always) to CLAUDE.md to mitigate, but the model still overrides it
  • Pattern: The model appears to be inferring the home directory from the username and capitalizing it (treating it like a proper noun), even when the CLAUDE.md explicitly forbids it

What Should Happen?

Use the correct home folder to access files

Error Messages/Logs

Steps to Reproduce

It happens randomly but in many sessions.

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.1.92 and olders

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

Other

Additional Information

_No response_

View original on GitHub ↗

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