Skip to content
Source
Sign inSign up
pingdotgg/t3code

[Bug]: Provider auto-update ignores which Homebrew formula is actually installed for claude-code #6245

Closedrohitashwin(GitHub profile, opens in a new tab) opened this issue 0 comments

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/server

Steps to reproduce

  1. Install Claude Code via brew install claude-code@latest (the auto-updating formula), not the plain claude-code formula.
  2. In the desktop app, trigger a provider update for Claude via the update control.
  3. Observe that the update fails.

Expected behavior

The app should run brew upgrade claude-code@latest (matching the formula actually installed) and successfully update the CLI.

Actual behavior

ClaudeDriver.ts hardcodes homebrewFormula: "claude-code", and makeHomebrewProviderMaintenanceCapabilities in apps/server/src/provider/providerMaintenance.ts always builds the update command from that static string regardless of which formula/cask the resolved binary path actually belongs to. Anyone who installed via claude-code@latest (or any other differently-named formula) gets brew upgrade claude-code, which openly fails with a non-zero exit and Error: Cask 'claude-code' is not installed. because that formula isn't installed:

$ brew upgrade claude-code
==> Downloading Homebrew API data
Error: Cask 'claude-code' is not installed.
$ echo $?
1

Impact

Major degradation or frequent failure

Version or commit

main @ 52e5a75a8

Environment

macOS (Homebrew), Claude provider installed via brew install claude-code@latest

Logs or stack traces

$ brew upgrade claude-code
==> Downloading Homebrew API data
Error: Cask 'claude-code' is not installed.

Workaround

Manually run brew upgrade claude-code@latest in a terminal instead of using the in-app update control.


I dug into this and put up a fix: resolvePackageManagedProviderMaintenance now extracts the actual installed formula name from the resolved Homebrew Cellar/Caskroom path (e.g. .../Cellar/claude-code@latest/...) and upgrades that formula instead of the driver's hardcoded default, falling back to the definition's default when the path can't be parsed. Change + test in apps/server/src/provider/providerMaintenance.ts / providerMaintenance.test.ts. Happy to open a PR if that's useful.

  1. juliusmarminge closed this

Sign in to join this conversation.