claude-code - 💡(How to fix) Fix Misleading 'Update available' message for Homebrew users [3 comments, 4 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#49590Fetched 2026-04-17 08:36:50
View on GitHub
Comments
3
Participants
4
Timeline
7
Reactions
1
Author
Timeline (top)
labeled ×4commented ×3

When Claude Code is installed via Homebrew (brew install claude-code), the application displays an "Update available" message suggesting to run brew upgrade claude-code. However, running the command does nothing because the Homebrew cask is already at the latest available version.

Root Cause

It appears Claude Code checks the npm registry for the latest version (currently 2.1.112) and compares it against the installed version. Since Homebrew distributes a different (older) version (2.1.92), there is a version gap that the user cannot resolve via brew upgrade.

RAW_BUFFERClick to expand / collapse

Description

When Claude Code is installed via Homebrew (brew install claude-code), the application displays an "Update available" message suggesting to run brew upgrade claude-code. However, running the command does nothing because the Homebrew cask is already at the latest available version.

Root Cause

It appears Claude Code checks the npm registry for the latest version (currently 2.1.112) and compares it against the installed version. Since Homebrew distributes a different (older) version (2.1.92), there is a version gap that the user cannot resolve via brew upgrade.

Steps to Reproduce

  1. Install Claude Code via Homebrew: brew install claude-code
  2. Confirm latest Homebrew version is installed: brew info claude-code2.1.92
  3. Launch Claude Code → "Update available! Run: brew upgrade claude-code" message appears
  4. Run brew upgrade claude-code → No update applied (already at latest brew version)

Expected Behavior

Either:

  • Option A: The update check should compare against the latest Homebrew version, not the npm version, when installed via Homebrew.
  • Option B: The message should inform the user that a newer version exists on npm but is not yet available via Homebrew, e.g., "A newer version (2.1.112) is available on npm but not yet on Homebrew. To get the latest, switch to npm: npm install -g @anthropic-ai/claude-code"

Environment

  • OS: macOS (Darwin 25.4.0, Apple Silicon)
  • Installation method: Homebrew cask
  • Installed version: 2.1.92
  • npm latest version: 2.1.112
  • Homebrew latest version: 2.1.92

extent analysis

TL;DR

The issue can be resolved by modifying the update check in Claude Code to compare against the latest Homebrew version instead of the npm version when installed via Homebrew.

Guidance

  • The version gap between the Homebrew distributed version (2.1.92) and the npm registry version (2.1.112) causes the "Update available" message, so aligning these versions or adjusting the update check logic is necessary.
  • To verify the issue, compare the output of brew info claude-code with the version number displayed in the "Update available" message within Claude Code.
  • Consider modifying the update message to inform users about the version discrepancy and provide instructions on how to install the latest version via npm if desired.
  • The update check logic should ideally account for the installation method (Homebrew vs. npm) to provide accurate and actionable update messages.

Example

No code snippet is provided as the necessary modifications would depend on the internal implementation of Claude Code's update check mechanism.

Notes

This solution assumes that modifying the update check logic or the version comparison is feasible within the constraints of Claude Code's development and distribution process. The exact implementation details may vary based on how Claude Code is developed and maintained.

Recommendation

Apply a workaround by modifying the update check to compare against the Homebrew version or by informing users about the version discrepancy and providing npm installation instructions. This approach addresses the immediate issue without requiring an update to the Homebrew package itself.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING