[BUG] Bash(mkdir) creating a folder with a "-" in the name failed
Resolved 💬 2 comments Opened Mar 9, 2026 by ehds Closed Apr 7, 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?
Claude try to temporary directory with a '-' in the directory name failed.
Bash(git status --short)
⎿ Error: ENOENT: no such file or directory, mkdir '/tmp/claude-0/-home/project/hello/tasks'
● Bash(git status --short)
⎿ Error: ENOENT: no such file or directory, mkdir '/tmp/claude-0/-home/project/hello/tasks'
● Bash(git -C home/project/hello status --short)
⎿ Error: ENOENT: no such file or directory, mkdir '/tmp/claude-0/-home/project/hello/tasks'
The issue is that mkdir (and most Linux commands) sees that leading - and thinks you're trying to pass a command-line option (like -p or -v) rather than a folder name.
What Should Happen?
Claude should create temporary directory sucessfuly.
Error Messages/Logs
Steps to Reproduce
Tell Calude to commit all changes.
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.71
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗