[BUG] Claude desktop app blocks new sessions with "Git is required" despite git being fully functional

Status Closed — not planned
Maintainer reply None cached
Activity 10 comments · opened Apr 6, 2026 · closed Jun 10, 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?

Title: Claude desktop app blocks new sessions with "Git is required" despite git being fully functional

Body:

## Bug Description

The Claude desktop app blocks new session creation with the error:

> Git is required for local sessions. Run `xcode-select --install` in Terminal to install the Command Line Tools, then restart the app.

Resuming existing sessions works fine — git operations function normally once in a session.

## Environment

- **macOS**: 15.7.4 (Build 24G517, Darwin 24.6.0)
- **Claude desktop app**: 1.569.0 (49894a), built 2026-04-02
- **git**: 2.50.1 (Apple Git-155) at `/usr/bin/git`
- **Xcode CLT**: Installed at `/Library/Developer/CommandLineTools/`
- **Xcode**: Full install, `xcode-select -p` → `/Applications/Xcode.app/Contents/Developer`
- **Xcode license**: Accepted (`xcodebuild -license check` returns no error)
- **Homebrew git**: Also installed at `/opt/homebrew/bin/git` (2.44.0)

## Reproduction

1. Open Claude.app
2. Try to start a new Local Claude Code session
3. Error appears, blocking session creation
4. Resuming an existing local session works fine

## What I've verified

All of these succeed from Terminal, including non-interactive contexts:

```bash
$ /usr/bin/git --version
git version 2.50.1 (Apple Git-155)

$ /usr/bin/git --version < /dev/null
git version 2.50.1 (Apple Git-155)

$ env -i HOME=$HOME /usr/bin/git --version
git version 2.50.1 (Apple Git-155)

$ xcrun --find git
/Applications/Xcode.app/Contents/Developer/usr/bin/git

What I've tried

  • sudo xcode-select --reset + restart app — no change
  • xcode-select --install — CLT already installed
  • Fully quitting (Cmd+Q) and reopening

Possibly related

#35872 — similar symptoms, but the root cause there (Xcode license not accepted in non-interactive context) doesn't apply here since the license is accepted and the Apple shim works even with a stripped environment and no TTY.


### What Should Happen?

I should be able to start a new local Claude Code Desktop session without an error message.

### Error Messages/Logs

```shell
"Git is required for local sessions. Run xcode-select --install in Terminal to install the Command Line Tools, then restart the app."

Steps to Reproduce

  1. Open Claude.app
  2. Try to start a new Local Claude Code session
  3. Error appears, blocking session creation
  4. Resuming an existing local session works fine

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

Claude 1.569.0 (49894a) 2026-04-02T20:01:42.000Z

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Other

Additional Information

<img width="1186" height="670" alt="Image" src="https://github.com/user-attachments/assets/2d102015-9181-4d57-ab6a-90922182942f" />

View original on GitHub ↗

8 Comments

github-actions[bot] · 4 months ago

Found 2 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/29898
  2. https://github.com/anthropics/claude-code/issues/34496

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

amanfredi · 4 months ago

https://github.com/anthropics/claude-code/issues/34496 might possibly be related, but is not obviously a duplicate because it refers to the windows desktop app and this issue is about the MacOS desktop app.

https://github.com/anthropics/claude-code/issues/29898 does not clearly separate what is happening from the related but distinct xcode licence acceptance issue.

njlawton · 4 months ago

Not sure if this is the issue for you but I also ran into the same problem on macOS after running "xcode-select --install"

In the end the issue was I had to agree to Xcode terms and conditions by running "sudo xcodebuild -license". After I agreed, the issue went away

mattbrannon · 4 months ago

Try checking the log file. It should be located at ~/Library/Logs/Claude/main.log I was having the same problem and it turned out I had an empty file named git somewhere in my PATH being picked up before the actual git binary. Removing that cleared the error for me. grep 'error' ~/Library/Logs/Claude/main.log should point you in the right direction.

pparavicini · 4 months ago

Thank you mattbrannon. I checked in the claude logs. In my case, I have ~/bin in my PATH, and Claude was trying to find git in that folder. I symlinked ~/bin/git to /usr/bin/git and the warning went away.

stefanwascoding · 3 months ago

Thanks for the tip with the log. In my case one of the folders in my $PATH had a git sub-folder (the sub-folder itself appears later in $PATH as well). When I rename the sub-folder Claude works. Otherwise it tries to 'run' that folder:

``2026-05-11 15:09:24 [error] [LocalSessionManager] Failed to check git status: Failed to spawn /Users/name/CLI/scripts/git: spawn /Users/name/CLI/scripts/git EACCES { stack: 'Error: Failed to spawn /Users/name/CLI/scripts/git: spawn /Users/name/CLI/scripts/git EACCES\n at ChildProcess.<anonymous> (/Applications/Claude.app/Contents/Resources/app.asar/.vite/build/index.js:162:102666)\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)' }``
github-actions[bot] · 2 months ago

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

dvolosnykh · 1 month ago

I suffer from the same issue with Claude for Mac: Claude 1.18286.0 (259c3f) 2026-07-02T07:11:03.000Z. This forced me to use CLI alternative.

Showing cached comments. Read the full discussion on GitHub ↗