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

Open
#37,241 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
68/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
node.js, rust
Domain
cli

Research direction

Start in codex-rs/cli/src/main.rs around lines 779-819, where the updater reports success after the package-manager command. Reproduce the no-version-change case with the documented codex --version and codex update commands, then verify that an already-current installation is reported as up to date without requesting a restart.

Written by the indexing model from the issue text.

Description

bug CLI

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:

$ 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.

Dominant language
Rust
Stars
125k
Forks
19.5k
Avg merge
1m
Merged PRs (30d)
1k

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from openai/codex

All issues in openai/codex

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.