LIVE|CLI v0.144.0·model GPT-5.6 Sol·verified 2026-07-09
Codex Insider
The unofficial wire for OpenAI Codex.
Install

How to update Codex and pin a version

Published Jul 15, 2026 · Checked against the official docs

The short version

Installed with npm? Run `npm install -g @openai/codex@latest`. On Homebrew, run `brew upgrade --cask codex`. Used the install script? Re-run it. Confirm the new build with `codex --version`. To dodge a bad release, install an exact version instead of latest, since Codex cuts new releases most days.

The right update command depends on how you installed Codex in the first place. Pick your install method below, run one line, and confirm.

Check what you’re running first

codex --version

That prints the installed build number, like 0.144.4. The official README documents install commands but doesn’t spell out a version flag, so codex --version isn’t in the docs word-for-word. It works the way --version does on any Rust CLI, and it’s what the troubleshooting threads use. Note the number before you update so you know what to roll back to if the new build misbehaves.

Update to the latest build

  1. npm: npm install -g @openai/codex@latest
  2. Homebrew: brew upgrade --cask codex (the cask is named codex, per the README)
  3. Install script: re-run curl -fsSL https://chatgpt.com/codex/install.sh | sh. The official docs say the same command updates in place.

Recent builds also ship a codex update self-updater that detects your install source and runs the matching command, added in this merged PR. It still isn’t in the official README, so if codex update reports it can’t detect your install method, fall back to the command for your channel above.

Pin or roll back a version

Codex ships fast. The releases page shows several 0.145.0-alpha builds cut the same day 0.144.4 went stable, and the tags run rust-v0.x.x. A build that broke something yesterday is normal here.

When a fresh release breaks your workflow, install an exact version instead of latest:

npm install -g @openai/[email protected]

List every published version first so you know what’s available to pin to:

npm view @openai/codex versions

Homebrew casks only carry the current version, so a clean downgrade means the npm path above or grabbing the older tarball off the releases page. Write the pinned version into your team’s setup notes so everyone lands on the same build.

If it fails

  • Version still shows the old number after updating. Your shell cached the old binary path. Open a fresh terminal, or run hash -r (bash and zsh) to clear the lookup, then check codex --version again.
  • macOS blocks the binary with “Apple could not verify…” after a Homebrew update. That’s Gatekeeper quarantining the bundled ripgrep, which hit cask installs around 0.144.1. Full fix at /errors/apple-could-not-verify-rg/.
  • npm install -g fails on permissions. Recent Codex needs Node 16 or newer (the npm package’s engines field) and a global prefix you can write to. Fix the prefix rather than sudo-installing globally.

Codex Insider Desk

Sources