Description
The CLAUDE_CODE_SHELL environment variable is ignored on Windows. Claude Code always uses Git Bash (/usr/bin/bash) regardless of the setting.
Steps to reproduce
- Set
CLAUDE_CODE_SHELL in ~/.claude/settings.json:
{
"env": {
"CLAUDE_CODE_SHELL": "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe"
}
}
- Also tried
setx CLAUDE_CODE_SHELL powershell.exe (system environment variable)
- Also tried short name
powershell.exe instead of full path
- Restart Claude Code in a new terminal window each time
Expected behavior
PowerShell is used as the shell for Bash tool calls.
Actual behavior
Git Bash (/usr/bin/bash) is always used regardless of the setting.
Environment
- OS: Windows 11 Pro for Workstations 10.0.26200
- Python: 3.13.12
- Claude Code: latest channel
Description
The
CLAUDE_CODE_SHELLenvironment variable is ignored on Windows. Claude Code always uses Git Bash (/usr/bin/bash) regardless of the setting.Steps to reproduce
CLAUDE_CODE_SHELLin~/.claude/settings.json:{ "env": { "CLAUDE_CODE_SHELL": "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" } }setx CLAUDE_CODE_SHELL powershell.exe(system environment variable)powershell.exeinstead of full pathExpected behavior
PowerShell is used as the shell for Bash tool calls.
Actual behavior
Git Bash (
/usr/bin/bash) is always used regardless of the setting.Environment