[BUG] Claude Code can't start in a directory whose name has a newline character
Resolved 💬 1 comment Opened May 13, 2026 by disconnect3d Closed Jun 11, 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?
Tested on both Linux and macOS, TL;DR:
$ claude --version
2.1.140 (Claude Code)
$ mkdir 'a\nb' && cd a\\nb
$ claude
This freeze Claude Code and it never starts.
What Should Happen?
Claude Code should open as usual.
Error Messages/Logs
There is no output, Claude just freezes.
Steps to Reproduce
Execute those commands in shell:
mkdir 'a\nb' && cd a\\nb
claude
Claude Model
None
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.140
Platform
Anthropic API
Operating System
Ubuntu/Debian Linux
Terminal/Shell
iTerm2
Additional Information
_No response_
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗