codex icon indicating copy to clipboard operation
codex copied to clipboard

Update command doesn't work as require inside WSL Terminal on Windows 11

Open Marve10s opened this issue 1 month ago • 2 comments

What version of Codex is running?

0.65.0

What subscription do you have?

Team Plan

Which model were you using?

gpt-5.2 medium

What platform is your computer?

Microsoft Windows NT 10.0.26100.0 x64

What issue are you seeing?

I’m trying to update Codex in my project from 0.65.0 to 0.72.0. The updater prompts “Update available! 0.65.0 -> 0.72.0” and offers “Update now (runs npm install -g @openai/codex)”. Running the suggested command returns:

Updating Codex via `npm install -g @openai/codex`...

changed 1 package in 3s

🎉 Update ran successfully! Please restart Codex.

After restarting, I get the same update prompt again, it loops infinitely. I tried “Skip” and “Skip until next version” (the issue first appeared when updating to 0.71.0), manually reinstalling, and deleting the Codex installation from my WSL Linux home on Windows, but the prompt persists

What steps can reproduce the bug?

  • Accept the update prompt “Update available! 0.65.0 -> 0.72.0”.
  • Choose “Update now” (runs npm install -g @openai/codex).
  • Observe the success message
  • Restart Codex - the update prompt reappears.
Image Image

What is the expected behavior?

Codex CLI should update itself to latest version,

Additional information

This is happening only for Codex, I do not have issues with other CLI tools. Also it works properly on Windows so issue related to Codex being inside the project that was created inside WSL Env.

Marve10s avatar Dec 15 '25 12:12 Marve10s

Hi! Thanks for filing this. In WSL vs in non-WSL, codex does not share the config files which is probably why you are seeing the difference in behaviors in the two environments.

Can you paste which codex from your WSL env and also paste the value from ~/.codex/version.json?

shijie-oai avatar Dec 15 '25 18:12 shijie-oai

@shijie-oai

Image
Version.json 
{"latest_version":"0.72.0","last_checked_at":"2025-12-15T11:59:37.574533012Z","dismissed_version":"0.72.0"}

Marve10s avatar Dec 15 '25 19:12 Marve10s

"latest_version":"0.73.0","last_checked_at":"2025-12-16T02:23:06.562034Z","dismissed_version":null it looks like install successed ,but mac cant show new version

Image

duke-yeah avatar Dec 16 '25 06:12 duke-yeah

@duke-yeah We probably have different issues. In my version.json I have a new version but running codex --version shows me the old one

Image

Marve10s avatar Dec 16 '25 07:12 Marve10s

@Marve10s, you're using bun rather than npm. There was a recent regression related to bun. It is fixed in the next release. Our recommended & documented install method is to use npm.

etraut-openai avatar Dec 16 '25 07:12 etraut-openai

Defect closed but no workaround for people facing the issue.

After some attempts I could finally manually delete the codex packages and reinstall

wsl

npm root -g /home/daniel/.nvm/versions/node/v22.20.0/lib/node_modules

cd /home/daniel/.nvm/versions/node/v22.20.0/lib/node_modules

rm -rf @openai

npm install -g @openai/codex

dliedke avatar Dec 19 '25 15:12 dliedke

@dliedke For me it was running the update command with bun. It autorunning npm always so it didn't work for me so instead u can try your preferred package manager with update command

Marve10s avatar Dec 19 '25 19:12 Marve10s