Skip to content

CLAUDE_CODE_SHELL environment variable ignored on Windows #25558

Description

@iandreychik

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:
    {
      "env": {
        "CLAUDE_CODE_SHELL": "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe"
      }
    }
  2. Also tried setx CLAUDE_CODE_SHELL powershell.exe (system environment variable)
  3. Also tried short name powershell.exe instead of full path
  4. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingplatform:windowsIssue specifically occurs on WindowsstaleIssue is inactive

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions