[BUG] Claude Code runs macOS /usr/bin/git placeholder when no developer tools are installed, repeatedly triggering the "install command line developer tools" dialog

Status Open
Reported on v2.1.280
Maintainer reply None cached
Activity 0 comments · opened Sep 24, 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?

On a Mac with no Xcode and no Command Line Tools installed, the Claude desktop app repeatedly triggers the macOS system dialog:

The "git" command requires the command line developer tools. Would you like to install the tools now?

Dismissing it only declines that one request, so it comes back. The dialog does not say which app caused it, which makes it hard for users to trace.

On macOS, /usr/bin/git is not git. It is Apple's on-demand-install placeholder, and running it without developer tools installed opens this dialog. The bundled Claude Code engine appears to find git with a plain PATH lookup, which on such a Mac resolves only to that placeholder. It then runs git rev-parse --is-inside-work-tree when a session's folder is not found to be a git repository, so sessions in ordinary folders raise the dialog.

The Claude desktop app's own git handling already avoids this. Before falling back to /usr/bin/git, it checks xcode-select -p and whether the active developer directory actually contains git, and otherwise treats git as unavailable. Claude Code's git resolution does not seem to make the same check.

What Should Happen?

When no developer tools are installed, Claude Code should treat git as unavailable instead of invoking /usr/bin/git. No system dialog should appear. Applying the same check the desktop app already uses would do it: use /usr/bin/git only if xcode-select -p succeeds and the developer directory it reports contains usr/bin/git.

Error Messages/Logs

No error is shown by Claude itself. The only visible symptom is the macOS dialog quoted above.

Steps to Reproduce

Use a Mac with no Xcode and no Command Line Tools installed, so xcode-select -p reports no active developer directory.
Open the Claude desktop app.
Start or reopen a Code session in a folder that is not a git repository.
The macOS "git command requires the command line developer tools" dialog appears. Dismiss it.
It appears again on later app launches and session opens.

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.1.280, bundled with Claude Desktop 2.7032.0

Platform

Other

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

Opus did this bug report for me after the two of us explored the problem.

View original on GitHub ↗