[BUG] Hardcoded "brew upgrade claude-code" notification is wrong for claude-code@latest cask

Status Fixed / completed
Maintainer reply None cached
Activity 5 comments · opened Mar 30, 2026 · closed Apr 15, 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?

The in-app update notification banner displays a hardcoded upgrade command:

Update available! Run: brew upgrade claude-code

This command is incorrect when the tool is installed via the claude-code@latest Homebrew cask. The correct command in that case is:

brew upgrade claude-code@latest

Running brew upgrade claude-code when claude-code@latest is installed will either do nothing (if claude-code is not installed) or upgrade a different cask entirely.

This became relevant with Homebrew/homebrew-cask#255221, which changed claude-code to track the stable release channel and introduced claude-code@latest for users who want the latest channel via Homebrew.

What Should Happen?

The upgrade command in the notification should reflect the actual Homebrew cask name used to install Claude Code. Since Claude Code already detects Homebrew installation (via /Caskroom/ in the binary path), it could detect the cask variant (claude-code vs claude-code@latest) from the path and use the appropriate brew upgrade <cask> command.

Steps to Reproduce

  1. Install via brew install claude-code@latest
  2. Wait for or trigger an update notification
  3. Observe the notification says brew upgrade claude-code instead of brew upgrade claude-code@latest

Claude Code Version

Any (behavior is hardcoded)

Platform

Homebrew (macOS/Linux)

Operating System

macOS

Additional Information

Related: Homebrew/homebrew-cask#255221
See also: #30790 (similar issue — brew notification shown when cask is already at latest)

View original on GitHub ↗

5 Comments

yurukusa · 6 months ago

The fix is straightforward — detect the cask name from the binary path. As a user-side workaround, you can suppress the notification and handle updates yourself:

// ~/.claude/settings.json
{
  "autoUpdate": false
}

Then update manually with the correct cask:

brew upgrade claude-code@latest

Or alias it in your shell:

alias claude-update='brew upgrade claude-code@latest'
ouyongx · 6 months ago

brew upgrade claude-code@latest
Error: Cask 'claude-code@latest' is not installed.

yurukusa · 6 months ago

Sorry about the confusion — I should have been clearer. The correct cask name depends on which one you originally installed:

brew list --cask | grep claude
brew upgrade claude-code        # if you have the stable cask
brew upgrade claude-code@latest # if you have the @latest cask

The issue here is that Homebrew split the casks: claude-code tracks stable releases, claude-code@latest tracks the latest channel (homebrew-cask#255221). The in-app banner hardcodes brew upgrade claude-code regardless of which cask you installed.

chwiese · 6 months ago

Fixed in claude-code 2.1.92 ("Fixed Homebrew install update prompts to use the cask's release channel"). The brew upgrade command in notifications is now dynamic — verified in the binary as brew upgrade ${caskName} rather than hardcoded brew upgrade claude-code.

github-actions[bot] · 5 months ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.