Repository navigation
[Bug]: Homebrew-installed Codex/Claude flagged outdated against npm latest, brew upgrade cannot clear it #7730
Description
Activity
- added a commit that references this issue
on Sep 3, 2026 Still reproducing on 0.0.38 (desktop, macOS 26 / Darwin 27.0.0 arm64, Node v24.19.0), 13 days after this was filed. Adding fresh evidence plus a three-machine spread that shows how the npm-latest comparison behaves across install channels.
Same failure, current versions
$ codex --version codex-cli 0.152.1 $ brew info --cask codex | head -1 ==> codex (Codex): 0.152.1 $ brew outdated --cask codex (nothing) $ curl -s https://registry.npmjs.org/@openai%2Fcodex/latest | jq -r .version 0.153.0The cask is at parity with what Homebrew can deliver, so
brew upgrade codexis a correct no-op, and the advisory staysbehind_latestagainst npm's 0.153.0.providerMaintenanceRunner.tsclassifies this asunchangedwith "Update command completed, but T3 Code still detects an outdated provider version." That message reads as "the update didn't take", so the natural response is to click again. From the server trace — five attempts in 74 seconds before the user gave up and rant3 triage:04:33:06 ProviderMaintenanceRunner.runCommand 12073ms 04:33:20 ProviderMaintenanceRunner.runCommand 20472ms <- reinstalled the same 0.152.1 04:33:41 ProviderMaintenanceRunner.runCommand 9805ms 04:33:59 ProviderMaintenanceRunner.runCommand 406ms 04:34:20 ProviderMaintenanceRunner.runCommand 362ms <- brew had nothing left to doHomebrew's own receipt confirms the second attempt did real work and still changed nothing user-visible:
Installed using the internal formulae.brew.sh API on 2026-09-03 at 04:33:40.Claude Code hits this too, and the gap is wider
claude-code cask: 2.1.236 npm @anthropic-ai/claude-code: 2.1.259A second machine in the same fleet installs Claude Code via
brew install --cask claude-codeand has been showing an unclearable advisory at 2.1.236. 23 patch versions is well past the "a few hours" window in the original report — for Claude Code the cask lag looks structural rather than transient, so the nag is effectively permanent there, not self-healing.Suggested fix
Source the latest version from the same channel that the resolved update command targets, rather than always npm:
- Homebrew-managed ->
https://formulae.brew.sh/api/cask/<token>.json(.version) - npm/bun/pnpm-managed -> npm registry (current behavior, correct there)
- native-managed -> the provider's own updater already reports currency; skipping the advisory entirely would be safer than comparing against npm
resolvePackageManagedProviderMaintenancehas already decided the channel by the timeresolveLatestProviderVersionruns, so the information needed is on hand —ProviderMaintenanceCapabilitieswould just need to carry the channel alongsidepackageName.Failing that, treating "command exited 0 but version did not move" as current for this channel rather than
unchangedwould at least stop the advisory from inviting an unbounded retry loop.Possibly a related gap (happy to split into its own issue)
The third machine in the fleet (Linux, no Homebrew) installs Codex with the standalone installer, which uses a versioned layout plus a
currentsymlink — structurally identical to the Claude native install thatClaudeDriveralready detects:~/.local/bin/codex -> ~/.codex/packages/standalone/current/bin/codex ~/.codex/packages/standalone/releases/ 0.142.5-x86_64-unknown-linux-musl 0.145.0-x86_64-unknown-linux-musl 0.147.0-x86_64-unknown-linux-musl 0.149.1-x86_64-unknown-linux-muslCodexDriver.tssetsnativeUpdate: null, and that path matches none of the detectors inresolvePackageManagedProviderMaintenance. With the default bare-namebinaryPath(settings.ts,makeBinaryPathSetting("codex")) it falls through to the npm-global fallback and runsnpm install -g @openai/codex@latest. That command succeeds, but it installs a second copy into the mise-managed Node prefix, whose bin directory precedes~/.local/binon PATH:$ command -v codex ~/.local/share/mise/installs/node/24/bin/codex # 0.153.0, installed by the fallback $ ls ~/.local/bin/codex ~/.local/bin/codex -> ~/.codex/packages/standalone/current/bin/codex # still 0.149.1So the advisory clears, but the standalone tree the vendor installer owns is now orphaned at the old version, and the copy that satisfied the advisory lives inside a runtime that mise reinstalls on upgrade — at which point
codexsilently reverts to 0.149.1 and the advisory returns. Updating a provider by installing it into a different channel than the one it came from is the underlying issue in both halves of this report.Codex does ship its own updater:
$ codex --help | grep update update Update Codex to the latest versionSo the Claude treatment appears to port over directly:
nativeUpdate: { executable: "codex", args: ["update"], lockKey: "codex-native", isCommandPath: (p) => normalizeCommandPath(p).includes("/.codex/packages/standalone/"), }
That would fix the standalone case and also give Homebrew-cask installs a working escape hatch, since
codex updateis available there too — which is relevant to the main issue above, wherebrew upgradeprovably cannot deliver the version npm is advertising.Environment: T3 Code 0.0.38 desktop (server on 127.0.0.1), macOS 26 (Darwin 27.0.0) arm64, Node v24.19.0, codex 0.152.1 via Homebrew cask.
Investigated with
t3 triage(Claude Opus 5 in Claude Code).- Homebrew-managed ->
Before submitting
Area
apps/server
Steps to reproduce
brew install --cask codex(same applies tobrew install --cask claude-code).@openai/codex@0.149.0hit npm at 21:04Z and the cask is still at 0.148.0.brew upgrade codex.brew upgrade codexin a terminal. Homebrew reports nothing to do.Expected behavior
A Homebrew-managed install is compared against what Homebrew can deliver. If the cask is at 0.148.0 and the install is 0.148.0, the provider is current, and the advisory only appears once the cask is bumped.
Actual behavior
resolveLatestProviderVersioninapps/server/src/provider/providerMaintenance.tsfetches latest fromhttps://registry.npmjs.org/<package>/latestfor every install kind, including whenresolvePackageManagedProviderMaintenancehas already decided the install is Homebrew-managed and the update command isbrew upgrade <formula>. npm and the Homebrew cask publish at different times, so the advisory isbehind_latestwith an update command that cannot satisfy it. The nag persists until the cask catches up, which can be hours.Cached provider snapshot on the affected machine (
~/.t3/caches/codex.json):Impact
Major bug
Version or commit
0.0.34-nightly.20260820.1146 (desktop); the same code is on
main@ fe87502Environment
macOS 26 (Darwin 25.6.0) arm64, Node v24.18.0, codex 0.148.0 via Homebrew cask (
/opt/homebrew/Caskroom/codex/0.148.0)Logs or stack traces
Workaround
Turn off provider update checks in Settings, or wait for the cask to be bumped.
Related
npm install -gagainst installs it never verified are npm-managed, causing a permanent "still needs an update" loop #5629 / fix(server): update standalone Codex installs with codex update #5630 are about the update command targeting the wrong install. This one is about the latest version source; the command is right, the comparison is wrong.Found by investigating the machine with a coding agent (Claude Fable 5 in Claude Code), alongside
t3 triagemachine facts.