CLAUDE_CODE_SHELL environment variable ignored on Windows

Resolved 💬 8 comments Opened Feb 13, 2026 by iandreychik Closed Mar 31, 2026

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

  1. Set CLAUDE_CODE_SHELL in ~/.claude/settings.json:

``json
{
"env": {
"CLAUDE_CODE_SHELL": "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe"
}
}
``

  1. Also tried setx CLAUDE_CODE_SHELL powershell.exe (system environment variable)
  2. Also tried short name powershell.exe instead of full path
  3. 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

View original on GitHub ↗

This issue has 8 comments on GitHub. Read the full discussion on GitHub ↗