[BUG] Hardcoded "brew upgrade claude-code" notification is wrong for claude-code@latest cask
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
- Install via
brew install claude-code@latest - Wait for or trigger an update notification
- Observe the notification says
brew upgrade claude-codeinstead ofbrew 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)
5 Comments
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:
Then update manually with the correct cask:
Or alias it in your shell:
brew upgrade claude-code@latest
Error: Cask 'claude-code@latest' is not installed.
Sorry about the confusion — I should have been clearer. The correct cask name depends on which one you originally installed:
The issue here is that Homebrew split the casks:
claude-codetracks stable releases,claude-code@latesttracks the latest channel (homebrew-cask#255221). The in-app banner hardcodesbrew upgrade claude-coderegardless of which cask you installed.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 hardcodedbrew upgrade claude-code.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.