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

Resolved 💬 5 comments Opened Mar 30, 2026 by chwiese 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 ↗

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