Update command doesn't work as require inside WSL Terminal on Windows 11
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.
<img width="497" height="200" alt="Image" src="https://github.com/user-attachments/assets/1eee4d96-2bf1-4ca0-a01b-e4ba1b46dafe" />
<img width="609" height="252" alt="Image" src="https://github.com/user-attachments/assets/3709ed90-56b9-4366-861c-385736a947f9" />
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.
7 Comments
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 codexfrom your WSL env and also paste the value from~/.codex/version.json?@shijie-oai
<img width="398" height="49" alt="Image" src="https://github.com/user-attachments/assets/8e6712c8-673b-4177-8c81-954de731713b" />
"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
<img width="868" height="62" alt="Image" src="https://github.com/user-attachments/assets/9323377d-6f8e-4a4b-bf06-b9c0a65ad31c" />
@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
<img width="457" height="78" alt="Image" src="https://github.com/user-attachments/assets/ad0c5ab1-c852-47bd-a9b4-f86da0bd9101" />
@Marve10s, you're using
bunrather thannpm. There was a recent regression related to bun. It is fixed in the next release. Our recommended & documented install method is to usenpm.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 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