Skip to content

Staying current with Codex

Staying current with Codex means knowing which Codex CLI version each machine and pipeline runs, updating it on purpose, and pinning it wherever a script depends on it. At the last update (26 September 2026) the current CLI was codex-cli 0.157.1, and GPT-6 Astra has been the bundled default model since CLI 0.153.4.

This hub is for the developer who runs Codex every day and the tech lead who owns the team’s Codex config and CI jobs. A teammate reports that GPT-6 Sol is missing from their model picker. Your nightly codex exec job got slower with no config change. Both have the same cause: nobody knows which Codex version runs where.

What you get from the Codex reference section

Section titled “What you get from the Codex reference section”
  • The three commands that tell you which Codex runs on a machine, and whether it is healthy.
  • How each Codex surface updates: CLI, IDE extension, desktop app, cloud, and the GitHub Action.
  • A team version policy in five steps, with the config.toml keys that make it stick.
  • Two copy-paste prompts: one finds every unpinned Codex install in a repository, one watches for new releases.
  • The Codex version history, with every breaking change since August 2026 and a seven-step upgrade routine.

Run these in a terminal:

Terminal window
which -a codex # more than one path means two installs compete on PATH
codex --version # the binary that wins, e.g. codex-cli 0.157.1
npm view @openai/codex version # the current npm release
codex doctor --summary # install, config, auth, and runtime checks; exits 1 on a failure

A version number proves only that a binary exists. codex doctor proves it reads your config and can sign in, so run it after every update.

SurfaceHow it updatesWhat to pin
CLIcodex update re-runs the installer you used (standalone script, npm, pnpm, or Homebrew)npm install -g @openai/codex@0.157.1 in CI and containers
IDE extension (VS Code, Cursor, Devin Desktop, formerly Windsurf)Through the editor’s extension managerThe editor’s own extension version policy
Desktop appcodex app launches it on macOS and Windows; the Linux CLI has no app command (checked 0.157.1). Press reports say the app moved into the ChatGPT desktop app on 9 July 2026 (secondary: Neowin)Nothing to pin from the CLI
Codex cloud (codex cloud, experimental)Server-sideNothing; record which model each task used if you compare results
GitHub ActionNew tags of openai/codex-action (newest v1.12)A tag or commit SHA, plus its codex-version input

Codex shipped 11 minor versions between 0.147.0 (7 August 2026) and 0.157.1 (26 September 2026), per the npm registry, and several of them removed flags that scripts used. A team policy keeps workstations current and CI predictable.

  1. Pin the CLI in every non-interactive place: CI jobs, Dockerfiles, devcontainers. Never install @openai/codex@latest in a pipeline.

  2. Pin the model in the project config, so a changed default cannot move your cost or eval baseline:

    .codex/config.toml
    model = "gpt-6-astra"

    Codex loads a project .codex/config.toml only for trusted projects, so CI jobs should also pass -m gpt-6-astra explicitly.

  3. Leave update prompts on for workstations. Set check_for_update_on_startup = false only on machines where a platform team rolls out Codex centrally.

  4. Name one owner who reads the release notes weekly. The release-watch prompt below does the reading; the owner decides.

  5. Upgrade through a pull request that follows the upgrade routine in the version history. The CI owner approves the merge.

How do you prove an upgrade is safe without reading agent output?

Section titled “How do you prove an upgrade is safe without reading agent output?”

The gates are mechanical. codex doctor --summary exits with status 1 when a check fails. In a runner without outbound network access the reachability check fails by design, so run doctor where Codex can reach its provider. codex exec --strict-config fails on any config.toml key the new version does not recognise, instead of ignoring it. A codex exec --output-schema run on a fixed fixture gives a pass signal you compare with the last known-good result. Combine the config gate and the output gate in one run: codex exec --strict-config --output-schema schema.json -m gpt-6-astra "…". If any gate fails, roll the pin back to the last known-good version before you debug. The non-interactive Codex guide covers --output-schema in depth.

Check each row of the first prompt’s table against the file it names, and each BREAKING line from the second against the release note it quotes.

What goes wrong when Codex versions drift?

Section titled “What goes wrong when Codex versions drift?”
  • The terminal and the IDE run different versions. Two installs sit on PATH. Run which -a codex, keep one, and restart the editor.
  • codex update cannot detect the install method. The binary came from a release archive. Reinstall with the standalone script, npm, or Homebrew, then delete the manual copy.
  • A new model is missing from the picker. The CLI is too old: GPT-6 Astra needs 0.153.0 or later, and GPT-6 Sol and GPT-6 Luna need 0.155.0 or later. Move the CLI pin first, then the model pin.
  • A pipeline fails with unexpected argument. A flag was removed. Match the message against the breaking-changes table in the version history, and roll the pin back to the last known-good version if the fix takes longer than an hour.
  • Laptops drift months behind. Someone set check_for_update_on_startup = false without central rollout. Remove the key, and add codex --version to your onboarding checklist.

The other tools have the same section: staying current with Claude Code and staying current with Cursor. For OpenAI’s full notes, read the Codex releases on GitHub.