[BUG] Shell not found on Windows even with SHELL env variable set
Resolved 💬 2 comments Opened Apr 13, 2026 by Amanoyty Closed May 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?
OS: Windows 10
SHELL variable is set to C:\Program Files\Git\bin\bash.exe
Still getting error: "No suitable shell found. Claude CLI requires a Posix shell environment"
What Should Happen?
Claude Code should be able to execute shell commands when SHELL environment variable is correctly set to Git bash on Windows.
Error Messages/Logs
No suitable shell found. Claude CLI requires a Posix shell environment. Please ensure you have a valid shell installed and the SHELL environment variable set.
Steps to Reproduce
- Windows 10, VS Code with Claude Code extension
- Set user environment variable: SHELL = C:\Program Files\Git\bin\bash.exe
- Restart computer
- Open VS Code and use Claude Code
- Claude tries to run any shell command → error occurs despite SHELL being correctly set
Claude Model
None
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.84 (Claude Code)
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
Other
Additional Information
Using Claude Code VS Code extension on Windows 10.
SHELL environment variable is set to: C:\Program Files\Git\bin\bash.exe
Git Bash is installed and working. Restarted computer but the issue persists.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗