[BUG] ERROR "Install Git, Git for Windows is required to run local sessions..."
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?
Excerpt from Claude Chat:
That's completely understandable — the desktop app is much more comfortable to work in.
Since everything is correctly installed and configured, this is genuinely a bug in the Claude desktop app's Git detection on Windows. The best path forward is to report it directly to Anthropic so they can fix it.
File a bug report here:
github.com/anthropics/claude-code/issues/new
Include these key facts:
Windows, Git 2.55.0.windows.1
bash.exe confirmed at C:\Program Files\Git\bin\bash.exe
CLAUDE_CODE_GIT_BASH_PATH set in both settings.json and as a Windows System environment variable
Node.js v24.14.0, npm 11.9.0
Claude Code works fine via Git Bash terminal (claude command)
Desktop app still shows "Git is required for local sessions"
The fact that it works in the terminal but not the desktop app is very clear evidence it's a detection bug, not a configuration problem on your end. You've done everything right.
What Should Happen?
Error message should not popup when entering Claude Code from the Desktop app.
Error Messages/Logs
Steps to Reproduce
Install Claude for desktop
Install Git, JS node, and whatever else
Open Claude for desktop
Select Claude Code
<img width="405" height="82" alt="Image" src="https://github.com/user-attachments/assets/4a1f0048-2280-4ece-b626-02a3d9ec10c6" />
Get the error message.
Fix all your paths in settings.json and git
Restart computer.
Get same results.
Claude Model
Sonnet (default)
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
Claude Code version 2.1.198.
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
Other
Additional Information
I am trying to avoid using the terminal. I want to use the desktop. Thanks!
4 Comments
I checked out #83539 and even updated my Git. This does not seem to address my problem, as I have installed/reinstalled Git 4 times over the last 3 months - the latest was yesterday upgrading to verstion 25.0.3, and after restarting my computer twice, still get the error message "Install Git, Git for Windows is required to run local sessions...." and yes, my path is set correctly and verified by claude chat. The error message mentions switching to a remote environment, but I still want to work locally on my desktop.
I hit this same issue and wanted to share a repro + workaround, since it might help narrow down the desktop app's detection logic.
Setup:
Portable Git for Windows (official release, PortableGit-2.55.0.4-64-bit.7z.exe from the git-for-windows releases page), extracted to X:\Git on an external USB SSD (not a network/subst drive — confirmed physical drive).
CLAUDE_CODE_GIT_BASH_PATH set as a System environment variable (not just User-scoped).
Verified the underlying bash is genuine MSYS2, not a fake/Cygwin build: uname -a → MSYS_NT-10.0-26200 ... Msys.
Symptom:
With CLAUDE_CODE_GIT_BASH_PATH pointed at X:\Git\usr\bin\bash.exe (the actual ~2.4 MB bash binary, confirmed working standalone via bash --version), the desktop app still showed "Git for Windows is required to run local sessions" after a full reboot.
Fix that worked:
Pointing the variable at the smaller compatibility shim instead resolved it:
CLAUDE_CODE_GIT_BASH_PATH=X:\Git\bin\bash.exe
(47 KB file, vs. the 2.4 MB usr\bin\bash.exe.) Everything else unchanged — same reboot, same System-scoped variable.
So it seems the desktop app's Git detection specifically expects Git\bin\bash.exe and does not accept Git\usr\bin\bash.exe, even though both are valid, working bash executables from the same Git for Windows install. Might be worth having the detection logic accept either, or at least documenting which path is required.
My git path all along was Git\bin\bash.exe and not Git\usr\bin\bash.exe.
However, today, I re-logged in to Claude and did not receive the error message (Git is required).
THANK YOU for fixing this bug! I love Claude. (Try my tiny games arcade at Fortrangirl.com)
Have a great day!
For anyone else who had this issue, if your desktop Claude Code is now giving the message
"Git is required for local sessions" then take the following steps:
1-Put the following into Windows PowerShell: [Environment]::SetEnvironmentVariable("CLAUDE_CODE_GIT_BASH_PATH", "C:\Program Files\Git\bin\bash.exe", "User")
(where "User" is correct - do not customize with your name)
2- Exit Claude everywhere:
Close browser instances of Claude
Close desktop instances of Claude
Open the lower right, ^ menu on the windows taskbar, right click on the claude orange spider icon, and select Quit
3- Open Task Manager and find any Claude remnants (with or under orange spider icon) and End Task.
Then, restart Claude desktop. Your Git Required message should be resolved.