[BUG] Claude Code is opening a new window on every action
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?
When I used Claude Code 1.x.y it was fast.
When Claude Code 2.0.0 went out is was also fine.
Now with Claude Code 2.0.1, every time it wants to do something, it opens a bash window (GitBash) and every thing is now slow as hell.
Moreover, since the window takes focus, I can't do anything else while Claude Code is working: my other application always loses focus.
<img width="739" height="443" alt="Image" src="https://github.com/user-attachments/assets/51a7d921-5931-407d-9745-16c489699b3e" />
What Should Happen?
Claude should use internal tools, not external tools.
Error Messages/Logs
Steps to Reproduce
- Open VSCode.
- Ask Claude something.
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
2.0.0
Claude Code Version
2.0.1
Platform
Other
Operating System
Windows
Terminal/Shell
VS Code integrated terminal
Additional Information
Few weeks ago I tried the "installable version of Claude" in beta and it did the same thing.
I reverted back to the npm version.
Showing cached comments. Read the full discussion on GitHub ↗
13 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
No it's not the same issues. It talks about multiple instances of VSCode or Cursor.
My bug is that GitBash is opened on every action.
Windows taking focus every second block you from doing anything while claude is working!
!Image
Facing the same issue on native installation of claude code in windows 10. Extremely frustrating.
This worked for me:
I added a new environment variable
CLAUDE_CODE_GIT_BASH_PATHwith the value
C:\Program Files\Git\bin\bash.exeMake sure to point to bash.exe and not git-bash.exe, that fixed the issue for me.
This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.
Hi there,
I’m experiencing the same pop-up issue.
The solution above didn’t resolve it.
This behavior makes Claude unusable for me.
Has anyone found a fix?
In the meantime, I’ll switch to Cline.
I can confirm the issue. I'm running PyCharm. Yesterday, claude code integrated nicely, displaying all bash interactions in the PyCharm terminal window, today the bash windows are popping up during each reasoning process and are grabbing the focus. My CLAUDE_CODE_GIT_BASH_PATH points to C:\PATHTOUSER\AppData\Local\Programs\Git\git-bash.exe (I did not change it between yesterday and today).
I've been experiencing the same problem. My Git was installed to appdata as above. I tried setting
CLAUDE_CODE_GIT_BASH_PATHtoC:\PATHTOUSER\AppData\Local\Programs\Git\git-bash.exeand alsoC:\PATHTOUSER\AppData\Local\Programs\Git\bin\bash.exebut the same thing.Uninstalling git bash and rerunning as admin let me change the install path to
C:\Program Files\Git, claude then worked fine after updating the path variable, I guess there is a problem somewhere either in claude or windows accessing bash from the user profile or appdata foldersThanks a lot - that solved the issue for me. But I'd still consider this a bug that should be resoveld because the default installation path is in AppData.
ex: >cd C:\Users\YourUserName\Downloads
It should open the Install Setup wizard (UI) where you will find the option to select installation folder. Chose "C:\Program Files\".
Right-click your computer name in any opened File Explorer. Click "Properties" -> opens "System > About."
On Device Specifications \ Related Links \ click: Advanced system settings.
Opens in new window System Properties. At the bottom of the window click: Environment Variables.
Opens new window for Environment Variables. Make sure you have in the Variable Path: C:\Program Files\Git\bin\ (no quotes no spaces - it is column separated values).
If it is not updated, you need to add this C:\Program Files\Git\bin\ on both _User variables_ and _System variables_ .
After this, Claude will now use internal pointer for bash that will match where you have now installed Git i.e. "C:\Program Files\Git\bin\bash.exe" . There will be no more pop-ups.
My GitBash was installed to my local profile and my variable was pointing to (non-local admin user) "C:\Users\<User>\AppData\Local\Programs\Git\git-bash.exe"
I updated my CLAUDE_CODE_GIT_BASH_PATH to "C:\Users\<User>\AppData\Local\Programs\Git\bin" based on madkid82's reply above and that resolved the issue for me.
Didn't need to reinstall with local admin.
Simply changing CLAUDE_CODE_GIT_BASH_PATH to C:\PATHTOUSER\AppData\Local\Programs\Git\bin\bash.exe fixed it for me.