Run codex update to self-update, or use the command for your install route: re-run the standalone installer, npm install -g @openai/codex, or brew upgrade --cask codex. Check with codex --version. In CI and container images install an exact version so a behavior change arrives as a commit you can revert. Checked against OpenAI sources in August 2026.
codex updateself-updates when the installed release supports it.- Otherwise use your route: re-run the installer,
npm install -g @openai/codex, orbrew upgrade --cask codex. codex --versionbefore you report anything. Most bugs are already fixed.- Pin exactly in CI and images. Bump the pin as its own reviewable commit.
- The release train is fast: 0.146.1 on 5 August 2026, 0.147.0 on 7 August 2026.
- Before blaming a release, check whether it is actually the sandbox.
Updating
codex update
codex --version
Per-route commands, checked against the OpenAI docs in August 2026.
| Installed with | Update with | Notes |
|---|---|---|
| Standalone installer (macOS, Linux) | curl -fsSL https://chatgpt.com/codex/install.sh | sh | The install command and the update command are the same command |
| Standalone installer (Windows) | irm https://chatgpt.com/codex/install.ps1 | iex | Same again, from PowerShell |
| npm | npm install -g @openai/codex | Not npm update; a plain install pulls the current release |
| Homebrew (macOS) | brew upgrade --cask codex | Codex is a cask, not a formula |
| GitHub Release binary | Download the new archive | For pinned or air-gapped installs |
curl -fsSL https://chatgpt.com/codex/install.sh | CODEX_NON_INTERACTIVE=1 sh
Knowing what you are running
# what version
codex --version
# which binary, when two install routes overlap
which -a codex
# full health report: install, config, auth, runtime, git, terminal
codex doctor
# what exists on npm
npm view @openai/codex versions --json | tail -20
The release cadence, so you can calibrate
As of August 2026, stable releases land every few days and pre-releases most days. 0.146.1 published on 5 August 2026, 0.147.0 on 7 August 2026, with alpha builds in between. Two consequences follow from that rhythm and neither is optional.
- On a laptop, staying current is cheap and being stale is expensive. An install left alone for two months is missing dozens of fixes, and you will spend the time you saved debugging one of them.
- In a pipeline, an unpinned agent means the tool that produced yesterday's result is not the one running today. A regression becomes impossible to bisect, because nothing on your side changed.
Pinning
npm install -g @openai/codex@0.147.0
codex --version
FROM node:22-bookworm-slim
ARG CODEX_VERSION=0.147.0
RUN apt-get update && apt-get install -y --no-install-recommends \
git ca-certificates ripgrep bubblewrap \
&& rm -rf /var/lib/apt/lists/*
RUN npm install -g @openai/codex@${CODEX_VERSION}
Two environments, two policies.
| Environment | Policy | Why |
|---|---|---|
| Your laptop | Track the current release | Fixes land constantly; being stale costs more than churn |
| CI and pre-merge checks | Pin exactly | A result has to be attributable to a commit |
| Container images | Pin exactly, as a build arg | The image is the reproducibility boundary |
| A shared team box | Pin, bump on a schedule | One person updating should not surprise four others |
Bump the pin on a schedule, as its own commit with nothing else in it. Then a behavior change arrives inside something you can revert, instead of appearing on a Tuesday with no corresponding change on your side.
What an update does not touch
Updating replaces a binary. It does not replace your configuration, and that is worth being explicit about because the failure modes on either side of that line look identical from the outside.
What lives where, and what survives an update.
| Path | Holds | Survives an update |
|---|---|---|
~/.codex/config.toml | Settings, profiles, MCP servers, feature flags | Yes |
~/.codex/auth.json | Cached credential, unless you use the OS keyring | Yes |
~/.codex/sessions/ | JSONL transcripts of every run | Yes |
The codex binary | The agent itself | Replaced, which is the point |
# inside a session: prints config layer order, lowest precedence first,
# plus any managed policy that is overriding you
/debug-config
# feature flags persisted in $CODEX_HOME/config.toml
codex features
Most "the update broke my config" reports turn out to be a profile, a project-level .codex/config.toml, or a managed requirements layer taking precedence over the file you edited. The layer dump answers that in one screen, and it is a much shorter path than reinstalling.
Rolling back
npm install -g @openai/codex@0.146.1
codex --version
Before blaming a release, in order.
| Check | How | What it rules out |
|---|---|---|
| Version | codex --version | You are not on the release you think you are |
| Which binary | which -a codex | A second stale install shadowing the new one |
| Overall health | codex doctor | Install, auth, git and terminal problems |
| Effective config | /debug-config | A profile or managed layer overriding your file |
| Is it the sandbox? | Run once with --sandbox danger-full-access | A policy failure masquerading as a regression |
| Is it the service? | The OpenAI status page | A provider incident that has nothing to do with you |
Deprecations worth knowing before you upgrade
Behavior that changed under you, as of August 2026.
| Change | What to do |
|---|---|
codex exec --full-auto is a deprecated compatibility flag and warns | Use --sandbox workspace-write explicitly |
approval_policy = "on-failure" is deprecated | on-request interactively, never non-interactively |
| WSL1 support ended at Codex 0.115 | Convert the distro to WSL2, or run natively on Windows |
The Linux sandbox moved to bubblewrap | Install the bubblewrap package on Linux hosts |
Questions people ask
Run codex update if your build supports self-update. Otherwise use the command for your install route: re-run the standalone installer script, npm install -g @openai/codex, or brew upgrade --cask codex. Confirm with codex --version.
codex --version. Worth doing before reporting a bug, because releases land every few days and the answer is often that it is already fixed.
Install an exact version with npm install -g @openai/codex@x.y.z, or commit the DotSlash file from the GitHub Release so every contributor gets the same executable. Pin in CI and images, not on laptops.
Install the earlier version explicitly from npm, for example npm install -g @openai/codex@0.146.1. Homebrew and the standalone installer both track the current release, so neither has a clean downgrade path.
Fast. As of August 2026 stable versions land every few days, with pre-releases most days: 0.146.1 published on 5 August 2026 and 0.147.0 on 7 August 2026.
Whether it is actually the sandbox. Run once with the restrictions removed. If the failure disappears, it is a policy problem and the fix is --add-dir, a writable_roots entry, or enabling network access for that run, not a rollback.
For CI and container images, yes. For laptops, no. An old install quietly accumulates missing fixes and the eventual debugging cost exceeds the churn it avoided.
Almost always a Homebrew cask alongside an old npm global install. Run which -a codex to see both. Remove the one you do not want rather than depending on PATH order.
Sources
Every figure above was read from these pages on August 2026. Vendors reprice without notice; if you find a stale number, tell us.