codex update reports successful update and requests restart when already up to date

Open 💬 0 comments Opened Aug 6, 2026 by Roland013

What version of Codex CLI is running?

codex-cli 0.146.1

What subscription do you have?

Not relevant to this CLI update path.

Which model were you using?

Not applicable. The update subcommand does not invoke a model.

What platform is your computer?

Linux 7.0.0-28-generic x86_64 GNU/Linux

Node v24.15.0; npm 11.12.1; global npm installation.

Codex doctor report

Not included because this behavior is self-contained in the updater and independent of auth, model, MCP, or project configuration.

What issue are you seeing?

Running codex update while already on the current version invokes npm install, reports success, and asks the user to restart Codex even though the installed version does not change.

This makes a no-version-change reinstall appear to be an actual Codex update and implies that a restart is necessary.

Observed output:

~~~text
$ codex --version
codex-cli 0.146.1

$ codex update
Updating Codex via npm install -g @openai/codex...
changed 2 packages in 2s
Update ran successfully! Please restart Codex.

$ codex --version
codex-cli 0.146.1
~~~

What steps can reproduce the bug?

  1. Install the latest Codex CLI globally with npm.
  2. Run codex --version and note the version.
  3. Run codex update.
  4. Run codex --version again.
  5. Observe that the version is unchanged, while the updater still reports a successful update and requests a restart.

What is the expected behavior?

If the installed version is already current, report that Codex is already up to date and do not request a restart.

Alternatively, if reinstalling the current package is intentional, distinguish that outcome from a version update and explain whether a restart is actually needed.

Additional information

The current updater prints the success and restart message after only checking the package-manager exit status; it does not compare the installed version before and after:

https://github.com/openai/codex/blob/7a0e974e08c798d1e8d59d407aeb6e24db1313af/codex-rs/cli/src/main.rs#L779-L819

A search of the existing issue tracker did not reveal an obvious duplicate for this exact no-version-change behavior.

View original on GitHub ↗