False 'Update available' banner when installed via Homebrew cask and already on latest version

Resolved 💬 3 comments Opened Mar 13, 2026 by dkamotsky Closed Mar 17, 2026

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

  1. Install Claude Code via Homebrew cask: brew install claude-code
  2. 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)
```

  1. 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:

  1. Detects the package manager at runtime via AM_() → correctly returns "homebrew"
  2. 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
  3. Compares: if remoteLatest > installedVersion → shows the banner with brew 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-code to 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-code actually reports it as outdated

Environment

  • Claude Code: 2.1.74
  • Install method: Homebrew cask (brew install claude-code)
  • installMethod in ~/.claude.json: "unknown"
  • Platform: macOS 15.4 (Darwin 25.3.0), Apple Silicon
  • Homebrew: latest

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗