[BUG] Windows Desktop app: `!` interactive shell forces PowerShell, ignoring defaultShell:"bash" (CLI works with identical settings)
Preflight Checklist
- [x] I have searched existing issues. This was reported before in #61516 and #69375, but both were auto-closed by the inactivity/duplicate bot without any fix, and the bug still reproduces on a newer version. The auto-close bot on #61516 explicitly said to open a new issue if still relevant — hence this report.
- [x] This is a single bug report
- [x] I am using the latest version of Claude Code
What's Wrong?
In the Claude Code Desktop app on Windows, the ! interactive shell (and the integrated >_ terminal) always spawns PowerShell, ignoring "defaultShell": "bash" in ~/.claude/settings.json.
The key new data point that the previous reports (#61516, #69375) did not have is an isolation test that proves this is desktop-app-specific, not a configuration problem:
| Run environment | ! shell result |
|---|---|
| Standalone CLI (claude in a terminal), identical settings.json | ✅ Git Bash — !echo $SHELL → /bin/bash.exe |
| Desktop app | ❌ PowerShell — !git branch prints the Windows PowerShell / Copyright (C) Microsoft Corporation banner and runs under powershell.exe |
Same machine, same ~/.claude/settings.json. Since the CLI correctly honors defaultShell: "bash", the settings are valid — the Desktop app simply does not apply defaultShell to its ! interactive shell and falls back to PowerShell.
What Should Happen?
The Desktop app's ! interactive shell (and >_ integrated terminal) should honor "defaultShell": "bash" and use Git Bash, exactly like the CLI does with the same settings.
Steps to Reproduce
- On Windows with Git for Windows installed, set in
~/.claude/settings.json:
``json``
{
"defaultShell": "bash",
"env": {
"CLAUDE_CODE_GIT_BASH_PATH": "C:/Program Files/Git/bin/bash.exe"
}
}
- Fully quit the Desktop app (system tray → Quit) and relaunch.
- In the Desktop app, run
!git branch(or!echo $SHELL). - Observe: PowerShell is used (PowerShell banner appears), not Git Bash.
- For contrast, run
claudefrom a terminal and run the same!echo $SHELL→ it correctly returns/bin/bash.exe.
Configuration (relevant settings.json)
{
"defaultShell": "bash",
"env": {
"CLAUDE_CODE_USE_POWERSHELL_TOOL": "0",
"CLAUDE_CODE_GIT_BASH_PATH": "C:/Program Files/Git/bin/bash.exe"
}
}
C:/Program Files/Git/bin/bash.exeexists andbashis on PATH (which bash→/usr/bin/bash).defaultShellonly accepts"bash"/"powershell"per docs;"bash"is set.- Fully quit and relaunched the Desktop app; the behavior persists.
Claude Code Version
CLI used for the isolation test: v2.1.196 (!echo $SHELL → /bin/bash.exe, correct). The Desktop app (bundled Claude Code) exhibits the bug.
Operating System
Windows 11 Home (10.0.26200)
Terminal/Shell
Git Bash (Git for Windows) configured as defaultShell; Desktop app forces PowerShell instead.
Additional Information
Related prior reports, both closed without a fix: #61516 (closed NOT_PLANNED / inactivity), #69375 (closed as duplicate of #61516).
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗