False 'Update available' banner when installed via Homebrew cask and already on latest version
Description
Claude Code shows "Update available! Run: brew upgrade claude-code" on startup even when the installed version matches the latest Homebrew cask version exactly.
Steps to Reproduce
- Install Claude Code via Homebrew cask:
brew install claude-code - Confirm you're on the latest version:
```
$ claude --version
2.1.74 (Claude Code)
$ brew info claude-code
==> claude-code: 2.1.74
Installed: /opt/homebrew/Caskroom/claude-code/2.1.74 (190.4MB)
```
- Launch
claude— the "Update available!" banner appears despite versions matching.
Expected Behavior
No update banner when claude --version matches the latest available Homebrew cask version.
Actual Behavior
Banner displays:
Update available! Run: brew upgrade claude-code
Running brew upgrade claude-code reports "already installed."
Root Cause Analysis
Reading the minified source in the binary, the PackageManagerAutoUpdater component:
- Detects the package manager at runtime via
AM_()→ correctly returns"homebrew" - Fetches the latest version from a remote source (npm registry or Anthropic API) via
fvT(channel)— this is not the Homebrew cask's latest version - Compares: if
remoteLatest > installedVersion→ shows the banner withbrew upgrade claude-code
The mismatch occurs because the remote version source can report a newer version than what the Homebrew cask has published. The user is told to brew upgrade for a version that Homebrew doesn't have yet.
Additionally, installMethod in ~/.claude.json is 'unknown' (likely because the install predates tracking), which may route to the package-manager banner path (CG9) instead of the native auto-updater path (vG9).
Suggested Fix
The version comparison for the Homebrew path should either:
- Query
brew info --json claude-codeto get the actual latest cask version, or - Suppress the banner when the installed version matches the Homebrew-installed version (already detected), or
- At minimum, only show the banner when
brew outdated claude-codeactually reports it as outdated
Environment
- Claude Code: 2.1.74
- Install method: Homebrew cask (
brew install claude-code) installMethodin~/.claude.json:"unknown"- Platform: macOS 15.4 (Darwin 25.3.0), Apple Silicon
- Homebrew: latest
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗