[BUG] Claude Code Desktop MacOS can't find git , but git is installed
Status Closed — not planned
Maintainer reply None cached
Workaround ✓ Mentioned in thread ↓
Activity 5 comments · opened Apr 29, 2026 · closed Jun 4, 2026
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 Claude Code Desktop for MacOS is started (Claude 1.5354.0 (9a9e3d) 2026-04-29T01:14:34.000Z) is asking to install git, but git is installed. Started to happen with the last version.
What Should Happen?
Should not request for git installation if it's already installed
Error Messages/Logs
Install Git
Git is required to run local sessions. Run xcode-select --install in Terminal to install the Command Line Tools, or download Git directly — or switch to a remote environment.
-----
logs :
2026-04-29 20:10:01 [error] Git command failed: git --version { code: undefined, stderr: undefined, cwd: '/' }
2026-04-29 20:10:01 [error] [LocalSessionManager] Failed to check git status: Failed to spawn /Users/xxx/bin/git: spawn /Users/xxx/bin/git EACCES { stack: 'Error: Failed to spawn /Users/xxx/bin/git: spawn /Users/xxx/bin/git EACCES\n at ChildProcess.<anonymous> (/Applications/Claude.app/Contents/Resources/app.asar/.vite/build/index.js:296:13438)\n at ChildProcess.emit (node:events:521:24)\n at ChildProcess._handle.onexit (node:internal/child_process:293:12)\n at onErrorNT (node:internal/child_process:508:16)\n at process.processTicksAndRejections (node:internal/process/task_queues:90:21)' }
Steps to Reproduce
To start Claude Code Desktop app on mac
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
Claude 1.5354.0 (9a9e3d)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Warp
Additional Information
git --version
git version 2.50.1 (Apple Git-155)
5 Comments
Hitting the same
EACCESerror on macOS, but with a different path pattern that may help narrow down the bug.Environment
/opt/homebrew/bin/git/usr/bin/git(Apple Git 2.50.1) also worksxcode-select -p→/Library/Developer/CommandLineToolsLog
The app is trying to spawn
/opt/homebrew/opt/git, which is a directory (Homebrew's formula opt prefix), not a binary. The actual binary lives at/opt/homebrew/opt/git/bin/gitor/opt/homebrew/bin/git. Looks like the discovery logic is missing the/bin/gitsuffix when it resolves throughbrew --prefix gitor similar.Workaround that fixed it for me
Replacing the directory symlink with one pointing at the binary makes the app start normally. (Will obviously break on
brew upgrade git.)The original report has
/Users/xxx/bin/gitas the bad path; this one has/opt/homebrew/opt/git. SameEACCESshape, different discovery source — looks like the resolver has multiple paths that all forget to append the binary name.Additional findings for the Homebrew git EACCES issue
Environment: macOS (Apple Silicon), Claude Desktop 1.6259.1, git installed via Homebrew
Problem: The app fails to find git even when it is installed, throwing
spawn /opt/homebrew/Cellar/git EACCES. This is not a permissions issue — the error occurs because the app resolves the git symlink chain all the way to the Cellar directory and then attempts to spawn that directory as an executable.Root cause (from
app.asarsource): TheoFn()function deliberately skips/usr/bin/gitand prefers any other git found in PATH viaUd("git", [], e). When Homebrew git is installed, the resolution chain is:Somewhere in this resolution the
bin/gitsuffix is dropped, leaving the app trying to spawn/opt/homebrew/Cellar/git(a directory), which producesEACCES.Workarounds (in order of invasiveness):
brew uninstall git— effective but undesirablebrew unlink git && sudo rm -rf /opt/homebrew/opt/git— removes the keg link the resolver follows; Cellar install remains intact/usr/local/bin/gitpointing to/usr/bin/gitdoes not work because the app finds Homebrew git first —oQ()/$ki()includes/opt/homebrew/binbefore/usr/local/binin its search orderSuggested fix: In
oFn(), either stop skipping/usr/bin/giton macOS, or validate that the resolved path is an executable file rather than a directory before caching it injN.Closing for now — inactive for too long. Please open a new issue if this is still relevant.
Why was this closed as "stale" and "inactive"? It's definitely not stale, and the inactivity is on the Anthropic side.
I'm using Claude 1.15962.2 (ab0f59) 2026-06-30T03:34:27.000Z on macOS 26.5.1 (25F80), and the problem started after I upgraded from macOS 14. I cannot start any new session due to this bug - it insists that I need to install Git to use locally, and yet Git is very much installed:
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.