[BUG] Cache directory names use leading hyphens causing filesystem management issues
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?
- Cache directories in ~/.cache/claude-cli-nodejs/ are named with leading hyphens
(e.g., -home-michael-AI-planning-journal)
- This makes them difficult to manipulate with standard shell commands
What Should Happen?
- Suggested fix: Use an alternate separator or prefix (e.g.,
home-michael-AI-planning-journal or cache-home-michael-AI-planning-journal)
Error Messages/Logs
Steps to Reproduce
- Install Claude Code CLI (claude-cli-nodejs)
- Navigate to any directory under your home directory:
cd /home/username/some/project
- Start a Claude Code session:
claude
- Exit the session or let it create cache files
- Inspect the cache directory:
ls -la ~/.cache/claude-cli-nodejs/
Claude Model
Sonnet (default)
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
Environment: - Claude Code Version: 2.0.73 - Platform: Linux - OS Version: Linux 5.15.0-164-generic - Cache Location: ~/.cache/claude-cli-nodejs/
Platform
Anthropic API
Operating System
Ubuntu/Debian Linux
Terminal/Shell
Other
Additional Information
This is causing all kinds of hard to troubleshoot configuration problems.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗