Upgrading Codex CLI with Homebrew replaces the local codex command with the current packaged release so terminal sessions keep using the latest CLI behavior and fixes from OpenAI.
The current OpenAI Codex CLI documentation lists Homebrew as a supported package manager and uses brew upgrade codex as the upgrade command. Homebrew tracks the installed codex package and updates the binary in place when a newer release is available.
If the installed release is already current, Homebrew reports that no upgrade is needed and leaves the existing binary in place. Systems that previously used direct API-key login can still upgrade with Homebrew first, then refresh the local login state separately if the goal is to switch to ChatGPT-plan access.
Related: How to install Codex CLI with Homebrew
Related: How to check Codex CLI version
$ brew upgrade codex Warning: Not upgrading codex, the latest version is already installed
When a newer release is available, Homebrew downloads the updated package and replaces the installed codex binary instead of printing the already-installed message.
$ codex --version codex-cli 0.121.0
This confirms which codex build the current shell will run after the upgrade.
Related: How to check Codex CLI version
$ codex
If the earlier setup used direct API-key access and the next run needs to switch to ChatGPT-plan access, run codex logout before starting codex again. Related: How to log in to Codex with an API key
Related: How to log in to Codex with device authentication