Unable to upgrade codex with 'brew upgrade codex'

Resolved 💬 13 comments Opened Sep 11, 2025 by kiranjd Closed Sep 16, 2025

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 codex@0.32.0 and met with Error: No available formula with the name "codex@0.32.0".

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_

View original on GitHub ↗

13 Comments

PedroNavHur · 10 months ago

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.

edo-zhou · 10 months ago

<img width="1430" height="924" alt="Image" src="https://github.com/user-attachments/assets/596a790e-d538-48f6-afa6-3d50a258f1e2" />
It works now

MaurUppi · 10 months ago
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
snigdha920 · 10 months ago

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.

Djiit · 10 months ago

Hey folks, did you brew update before?

kiranjd · 10 months ago

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 · 10 months ago
<img alt="Image" width="1430" height="924" src="https://private-user-images.githubusercontent.com/14013570/488162685-596a790e-d538-48f6-afa6-3d50a258f1e2.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NTc3NDk5MzAsIm5iZiI6MTc1Nzc0OTYzMCwicGF0aCI6Ii8xNDAxMzU3MC80ODgxNjI2ODUtNTk2YTc5MGUtZDUzOC00OGY2LWFmYTYtM2Q1MGEyNThmMWUyLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTA5MTMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwOTEzVDA3NDcxMFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTg1MDg0MzE5YjVmMDIyODkwMmMxNmZjZTZiZWFhNGU2ZWUzMmZhODA1MTQyNGU5M2QzNzlhYTgzYzhhNDU1OWQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.R7WaXCFRDazdmVzadzT5ODwB8qyBCuOIC75_v6GkPRY"> It works now

The problem seems to be upgrading from 0.31.0 specifically

darkblitzrc · 10 months ago
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!

ygCEO · 10 months ago
> 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
========

captCovalent · 10 months ago

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

captCovalent · 9 months ago

Same issue form .46 -> .47.

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

awuzi · 9 months ago

@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

deadcoder0904 · 8 months ago

For me, brew uninstall --cask codex worked!