[BUG] brew upgrade claude-code downgrades from 2.1.87 to 2.1.81
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report
- [x] I am using the latest version of Claude Code (as reported by Homebrew)
What's Wrong?
Running brew upgrade claude-code downgrades the cask from version 2.1.87 to 2.1.81 instead of upgrading to the latest version.
Homebrew reports this as an "upgrade" but the version number decreases:
==> Upgrading 1 outdated package:
claude-code 2.1.87 -> 2.1.81
==> Upgrading claude-code
2.1.87 -> 2.1.81
The operation completes "successfully" but the user ends up on an older version.
Expected Behavior
brew upgrade claude-code should either:
- Upgrade to a version newer than 2.1.87, or
- Report that claude-code is already up to date
Steps to Reproduce
- Have Claude Code 2.1.87 installed via Homebrew cask
- Run
brew update && brew upgrade claude-code - Observe the "upgrade" from 2.1.87 → 2.1.81
Environment
- Claude Code version (before): 2.1.87
- Claude Code version (after): 2.1.81
- OS: macOS (Darwin 25.3.0)
- Installation method: Homebrew Cask (
brew install --cask claude-code) - Homebrew cask version reported: 2.1.81
Additional Context
This likely indicates the Homebrew cask definition is pointing to an older version (2.1.81) while in-app updates had already updated the binary to 2.1.87. The cask "upgrade" then overwrites the newer binary with the older cask version.
This is particularly confusing because Homebrew reports the operation as successful with no warnings about the version regression.
This issue has 8 comments on GitHub. Read the full discussion on GitHub ↗