Windows: bash popup window appears at startup due to -i flag in cygpath call
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?
On Windows with Git Bash/MSYS2, Claude Code spawns a visible
bash popup window at startup with this command:
/usr/bin/bash --login -i -c cygpath -u 'c:\repos\os'
The -i (interactive) flag causes Windows to open a console window.
Since cygpath doesn't need an interactive shell, removing -i would
fix the popup.
Environment:
- OS: Windows
- Shell: MSYS2/Git Bash
- Claude Code running as VS Code extension
What Should Happen?
On Windows with Git Bash/MSYS2, Claude Code spawns a visible
bash popup window at startup with this command:
/usr/bin/bash --login -i -c cygpath -u 'c:\repos\os'
The -i (interactive) flag causes Windows to open a console window.
Since cygpath doesn't need an interactive shell, removing -i would
fix the popup.
Environment:
- OS: Windows
- Shell: MSYS2/Git Bash
- Claude Code running as VS Code extension
Error Messages/Logs
Steps to Reproduce
Steps to Reproduce
Environment:
OS: Windows 10/11
Claude Code running as VS Code extension
Git Bash / MSYS2 installed (required by Claude Code on Windows)
Working directory: any Windows path (e.g. c:\repos\os)
Steps:
Open VS Code on Windows with Git Bash/MSYS2 installed
Open a project folder with a Windows-style path (e.g. c:\repos\os)
Open Claude Code (via VS Code extension)
Observe a bash terminal popup window appears with title:
/usr/bin/bash --login -i -c cygpath -u 'c:\repos\os'
Window appears briefly then closes (flashes on screen)
Expected behavior:
No visible popup window. Path conversion should run headlessly.
Actual behavior:
A black bash console window flashes on screen every time Claude Code runs a command.
Root cause (suspected):
The -i (interactive) flag in the bash invocation forces Windows to open a console window. Since cygpath only does path conversion and does not require an interactive shell, removing -i should fix the issue.
Workarounds attempted (none effective):
Setting SHELL=pwsh in ~/.claude/settings.json
Setting CLAUDE_CODE_SHELL=pwsh
Setting CLAUDE_BASH_MAINTAIN_PROJECT_WORKING_DIR=1
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.42
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
VS Code integrated terminal
Additional Information
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗