[BUG] Claude Code on Windows can't execute bash when started from a directory with a ' in the path
Resolved 💬 2 comments Opened Feb 20, 2026 by jackodonoghueqo Closed Feb 23, 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?
In the latest version, when claude code tries to execute any bash command it gets
Bash(pwd)
⎿ Error: Exit code 2
/usr/bin/bash: -c: line 1: unexpected EOF while looking for matching `''
/usr/bin/bash: -c: line 1: unexpected EOF while looking for matching `''
When started from a directory with a ' in the path. This is new behavior; this path was working on a previous version of claude code.
This is happening in git bash, powershell, and windows terminal
What Should Happen?
Claude should handle being started from a directory with a ' in the path and should be able to execute bash commands successfully.
Error Messages/Logs
Bash(pwd)
⎿ Error: Exit code 2
/usr/bin/bash: -c: line 1: unexpected EOF while looking for matching `''
/usr/bin/bash: -c: line 1: unexpected EOF while looking for matching `''
Steps to Reproduce
- Create a working directory with a ' in the path like
C:\Users\JackO'Donoghue\dev\ - Navigate to that directory
- Start claude code
- Ask claude to execute any bash command
Claude Model
Opus
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.49 (Claude Code)
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
PowerShell
Additional Information
_No response_
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗