codex icon indicating copy to clipboard operation
codex copied to clipboard

Unable to upgrade codex with 'brew upgrade codex'

Open kiranjd opened this issue 1 year ago • 13 comments

What version of Codex is running?

codex-cli 0.31.0

Which model were you using?

gpt-5

What platform is your computer?

Darwin 24.6.0 arm64 arm

What steps can reproduce the bug?

  1. Install codex using brew install codex
  2. As I launch codex, I get the nudge to upgrade on first open itself
jd@Kirans-MacBook-Pro vibe-code % codex

✨⬆️ Update available! 0.31.0 -> 0.32.0.
Run brew upgrade codex to update.
  1. When I do the upgrade with brew upgrade codex, it says 0.31 is already installed
jd@Kirans-MacBook-Pro vibe-code % brew upgrade codex
Warning: codex 0.31.0 already installed

I have also tried brew upgrade [email protected] and met with Error: No available formula with the name "[email protected]".

What is the expected behavior?

  1. New install with brew should install the latest version and not ask for upgrade as soon as i install(unless a release was done right after I installed)
  2. When I get nudge to upgrade, the upgrade should work

What do you see instead?

No response

Additional information

No response

kiranjd avatar Sep 11 '25 01:09 kiranjd

Same over here, seems the formula has not been updated yet and/or it takes some time for it to update.

https://formulae.brew.sh/formula/codex still shows 0.33.0 here although 0.34.0 is already out. One work around is to install it manually from https://github.com/openai/codex/releases which I had to do as 0.33 had issues with MCP servers.

PedroNavHur avatar Sep 11 '25 02:09 PedroNavHur

Image It works now

edo-zhou avatar Sep 11 '25 06:09 edo-zhou

brew upgrade codex
==> Upgrading 1 outdated package:
codex 0.31.0 -> 0.34.0
==> Fetching downloads for: codex
==> Fetching codex
==> Downloading https://ghcr.io/v2/homebrew/core/codex/blobs/sha256:8c9e4348837a8a918df875648ba753feccbb5a95a5dc80c038bffc715e0c0994
################################################################################################################################################################## 100.0%
==> Upgrading codex
  0.31.0 -> 0.34.0 
==> Pouring codex--0.34.0.arm64_sequoia.bottle.tar.gz
🍺  /opt/homebrew/Cellar/codex/0.34.0: 13 files, 17.5MB
==> Running `brew cleanup codex`...
Disable this behaviour by setting `HOMEBREW_NO_INSTALL_CLEANUP=1`.
Hide these hints with `HOMEBREW_NO_ENV_HINTS=1` (see `man brew`).
Removing: /opt/homebrew/Cellar/codex/0.31.0... (13 files, 17.9MB)
Removing: /Users/ouzy/Library/Caches/Homebrew/codex_bottle_manifest--0.31.0... (11.3KB)
Removing: /Users/ouzy/Library/Caches/Homebrew/codex--0.31.0... (7.8MB)
==> No outdated dependents to upgrade!
==> Caveats
zsh completions have been installed to:
  /opt/homebrew/share/zsh/site-functions

MaurUppi avatar Sep 11 '25 08:09 MaurUppi

I still have the issue, on version 0.31.0, using fish shell.

brew upgrade codex
Warning: codex 0.31.0 already installed

Edit: needed to update homebrew first: brew update to force brew to update its list of formulae, now it works.

snigdha920 avatar Sep 11 '25 09:09 snigdha920

Hey folks, did you brew update before?

Djiit avatar Sep 11 '25 12:09 Djiit

yes, i had done that too. Nothing seemeed to work. So I did:

  1. brew unlink codex
  2. brew uninstall codex
  3. and then brew install codex

This fixed the issue but i think version 0.31 seems to somehow stuck in update avalilable loop without a way to install a new version. Before removing everything, I had tried brew update, brew install codex --HEAD

kiranjd avatar Sep 13 '25 07:09 kiranjd

Image It works now

The problem seems to be upgrading from 0.31.0 specifically

kiranjd avatar Sep 13 '25 07:09 kiranjd

Hey folks, did you brew update before?

Anyone running into this error like I did today when trying to update to 0.36 should do this!

darkblitzrc avatar Sep 16 '25 00:09 darkblitzrc

Hey folks, did you brew update before?

Anyone running into this error like I did today when trying to update to 0.36 should do this!

  1. brew update && brew upgrade
  2. brew install rust
  3. brew uninstall codex
  4. brew install codex --HEAD ========

ygCEO avatar Sep 16 '25 12:09 ygCEO

Just did this and it worked: brew update && brew upgrade

captCovalent avatar Sep 16 '25 17:09 captCovalent

Same issue form .46 -> .47.

% brew upgrade codex Warning: Treating codex as a cask. For the formula, specify the --formulaflag. To silence this message, use the--cask flag.

captCovalent avatar Oct 20 '25 06:10 captCovalent

@captCovalent I was facing the same issue for this update. It seems that you installed codex using a package manager (such as npm). Try uninstalling the version installed with npm or your package manager (npm uninstall -g @openai/codex) Then try : brew unlink codex brew uninstall codex and finally brew install codex I tried it and it worked

awuzi avatar Oct 20 '25 07:10 awuzi

For me, brew uninstall --cask codex worked!

deadcoder0904 avatar Oct 27 '25 06:10 deadcoder0904