[BUG] Claude Code Desktop MacOS can't find git , but git is installed

Status Closed — not planned
Maintainer reply None cached
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)

View original on GitHub ↗

5 Comments

azuma317 · 5 months ago

Hitting the same EACCES error on macOS, but with a different path pattern that may help narrow down the bug.

Environment

  • macOS (Apple Silicon)
  • Claude Desktop: latest
  • git: 2.54.0 via Homebrew at /opt/homebrew/bin/git
  • /usr/bin/git (Apple Git 2.50.1) also works
  • xcode-select -p → /Library/Developer/CommandLineTools

Log

[error] Git command failed: git --version { code: undefined, stderr: undefined, cwd: '/' }
[error] [LocalSessionManager] Failed to check git status: Failed to spawn /opt/homebrew/opt/git: spawn /opt/homebrew/opt/git EACCES

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/git or /opt/homebrew/bin/git. Looks like the discovery logic is missing the /bin/git suffix when it resolves through brew --prefix git or similar.

Workaround that fixed it for me

sudo mv /opt/homebrew/opt/git /opt/homebrew/opt/git.bak
sudo ln -s /opt/homebrew/bin/git /opt/homebrew/opt/git

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/git as the bad path; this one has /opt/homebrew/opt/git. Same EACCES shape, different discovery source — looks like the resolver has multiple paths that all forget to append the binary name.

TSchiefer · 5 months ago

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.asar source): The oFn() function deliberately skips /usr/bin/git and prefers any other git found in PATH via Ud("git", [], e). When Homebrew git is installed, the resolution chain is:

/opt/homebrew/bin/git → /opt/homebrew/opt/git/bin/git → /opt/homebrew/Cellar/git/2.54.0/bin/git

Somewhere in this resolution the bin/git suffix is dropped, leaving the app trying to spawn /opt/homebrew/Cellar/git (a directory), which produces EACCES.

Workarounds (in order of invasiveness):

  1. brew uninstall git — effective but undesirable
  2. brew unlink git && sudo rm -rf /opt/homebrew/opt/git — removes the keg link the resolver follows; Cellar install remains intact
  3. A shell script wrapper at /usr/local/bin/git pointing to /usr/bin/git does not work because the app finds Homebrew git first — oQ()/$ki() includes /opt/homebrew/bin before /usr/local/bin in its search order

Suggested fix: In oFn(), either stop skipping /usr/bin/git on macOS, or validate that the resolved path is an executable file rather than a directory before caching it in jN.

github-actions[bot] · 4 months ago

Closing for now — inactive for too long. Please open a new issue if this is still relevant.

rbotzer · 3 months ago

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:

% xcode-select --install
xcode-select: note: Command line tools are already installed. Use "Software Update" in System Settings or the softwareupdate command line interface to install updates

% which git
/usr/bin/git

% ls -l $(which git)
-rwxr-xr-x  78 root  wheel  118928 May 21 01:57 /usr/bin/git
github-actions[bot] · 1 month ago

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.