[BUG] defaultShell: "powershell" setting not honored on Windows — Bash tool fails

Status Open
Maintainer reply None cached
Activity 0 comments · opened Oct 2, 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?

Body:

  • OS: Windows 11 Enterprise
  • Shell setting: "defaultShell": "powershell" in ~/.claude/settings.json
  • Problem: After setting defaultShell to powershell and restarting Claude Code, the Bash tool still tries to launch

Git Bash (C:\Program Files\Git\usr\bin\bash.exe) which doesn't exist, instead of PowerShell

  • Error:

Skipping command-line 'C:\Program Files\Git\usr\bin\..\usr\bin\bash.exe'
(not found)
Need a valid command-line

  • Expected: Bash tool should use PowerShell as configured
  • Impact: Bash tool completely non-functional — cannot run Python scripts or any shell commands

What Should Happen?

  • OS: Windows 11 Enterprise
  • Shell setting: "defaultShell": "powershell" in ~/.claude/settings.json
  • Problem: After setting defaultShell to powershell and restarting Claude Code, the Bash tool still tries to launch

Git Bash (C:\Program Files\Git\usr\bin\bash.exe) which doesn't exist, instead of PowerShell

  • Error:

Skipping command-line 'C:\Program Files\Git\usr\bin\..\usr\bin\bash.exe'
(not found)
Need a valid command-line

  • Expected: Bash tool should use PowerShell as configured
  • Impact: Bash tool completely non-functional — cannot run Python scripts or any shell commands

Error Messages/Logs

Steps to Reproduce

  • OS: Windows 11 Enterprise
  • Shell setting: "defaultShell": "powershell" in ~/.claude/settings.json
  • Problem: After setting defaultShell to powershell and restarting Claude Code, the Bash tool still tries to launch

Git Bash (C:\Program Files\Git\usr\bin\bash.exe) which doesn't exist, instead of PowerShell

  • Error:

Skipping command-line 'C:\Program Files\Git\usr\bin\..\usr\bin\bash.exe'
(not found)
Need a valid command-line

  • Expected: Bash tool should use PowerShell as configured
  • Impact: Bash tool completely non-functional — cannot run Python scripts or any shell commands

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

Claude Code v2.1.280 Sonnet 4.6 · Google

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗