After upgrading to macOS 27 Golden Gate yesterday, Claude Code kept reporting Git is required for local sessions, and VSCode's Source Control panel said Git wasn't installed. In Terminal, though, git status worked normally.
I eventually found an old Intel (x86_64) Git still on the system. The GUI apps found it first, failed to run it, and reported Git as missing. Terminal was using a different version and wasn't affected.
The underlying cause was that macOS 27 removed Rosetta 2 and no longer runs Intel (x86_64) binaries. That old Git had remained on the system for years, but stopped working after the upgrade.
Finding the old Git
First, list every file named git on your PATH:
echo $PATH | tr ':' '\n' | while read dir; do
[ -e "$dir/git" ] && echo "$dir/git" && ls -la "$dir/git"
done
I found a symlink like this:
/usr/local/bin/git
lrwxr-xr-x 1 you admin 14 Jun 28 2017 /usr/local/bin/git -> ../git/bin/git
Its timestamp was still 2017. Next, I ran that path directly to check whether it worked:
/usr/local/bin/git --version
It returned zsh: bad CPU type in executable, identifying the version that was failing.
Why Terminal worked but GUI apps didn't
Terminal and GUI apps don't necessarily get the same environment variables. Terminal reads the shell configuration, and .zshrc puts newer paths such as /opt/homebrew/bin first, where it finds a working Git. GUI apps may inherit the system PATH and encounter the old /usr/local/bin/git first.
On my machine, that version failed to execute, but the apps described it as missing. They didn't go on to use the working Git later in the path.
Removing the old symlink
After confirming that this symlink points to the failing version, remove it:
rm /usr/local/bin/git
Apple's /usr/bin/git is still there. With the old link removed, the GUI apps can use the system Git later in the path. If you prefer Homebrew's version, you can install an ARM build afterward.
Checking other old Intel tools
The same problem can affect other old tools. You can scan your PATH:
echo $PATH | tr ':' '\n' | while read dir; do
for f in "$dir"/*; do
[ -f "$f" ] && [ -x "$f" ] && \
file "$f" 2>/dev/null | grep -q "x86_64" && \
echo "Intel: $f"
done
done 2>/dev/null
I also found an Intel build of thefuck that printed bad CPU type whenever I opened Terminal. Reinstalling it with brew reinstall thefuck fixed that.
Next time a GUI app says a tool isn't installed, I'll check for an older version with the same name on PATH, confirm its architecture and whether it runs, then decide whether to remove it or replace it with an ARM build.