If you installed the Codex CLI on a Mac using Homebrew and see zsh: command not found: codex, the installation likely created a broken symlink or an empty cask directory. This guide shows how to fix it and update to the latest Codex CLI version (v0.111.0) to test GPT-5.4 medium.
This walkthrough applies to MacBook systems using Apple Silicon or Intel with Homebrew installed.
Step 1: Check if Codex Is Installed
First confirm whether Homebrew installed the Codex cask.
bash
brew list --cask | grep codex
If installed, you should see:
bash
codex
Then check details:
bash
brew info --cask codex
Typical output:
bash
codex ✔: 0.111.0
OpenAI's coding agent that runs in your terminal
Artifacts
codex-aarch64-apple-darwin -> codex (Binary)
This means Homebrew should create a binary named codex.
Step 2: Verify the Codex CLI Binary
Check if the executable exists.
bash
which codex
Expected result:
bash
/opt/homebrew/bin/codex
If you see:
bash
zsh: command not found: codex
the binary is missing or the symlink is broken.
Step 3: Inspect the Codex Installation Folder
Homebrew installs casks here:
bash
/opt/homebrew/Caskroom
Check the Codex directory:
bash
ls /opt/homebrew/Caskroom/codex/0.111.0
If the directory is empty, the archive download or extraction failed.
This is a known Homebrew issue where the binary symlink exists but the artifact was never extracted.