os error 2 after Windows Update
Resolved 💬 8 comments Opened Jan 14, 2026 by carldebilly Closed Jan 30, 2026
💡 Likely answer: A maintainer (etraut-openai, contributor)
responded on this thread — see the highlighted reply below.
What version of Codex is running?
codex-cli 0.81.0
What subscription do you have?
ChatGPT PLUS
Which model were you using?
gpt-5.2-codex
What platform is your computer?
Windows 11 PRO 64 bits
What issue are you seeing?
After the reboot to apply Windows Security Update KB5074109, Codex is unable to start, producing this error message:
PS C:\Users\Me> codex
Error: The system cannot find the file specified. (os error 2)
I checked the following:
- Nothing blocked on Windows Defender
- I reinstalled MSVC librairies (repair)
- I tried other versions of Codex - 0.78.0, 0.79.0, 0.80.0 -- those who were working until this morning
- I rebooted plenty of times
- I reinstalled npm to latest version (in case)
- I confirm the
C:\Users\Me\AppData\Roaming\npm\node_modules\@openai\codex\vendor\x86_64-pc-windows-msvc\codex\codex.exeexists and a direct execution produces the same result (os error 2)
What steps can reproduce the bug?
I don't know what to check
What is the expected behavior?
_No response_
Additional information
Windows Security Update: KB5074109 (26200.7623).NET 9.0.12 / 8.0.23 updates installed same day
8 Comments
Sounds like a path configuration issue on your system. You might want to ask ChatGPT to suggest potential fixes.
Windows-only failure after Windows Update (codex.exe)
After a Windows Update,
codexfails to start on one machine, while the same Codex version works on other Windows machines.Node does start correctly and executes
codex.js.The failure occurs when
codex.jsspawns the native binarycodex.exe.The user-visible error is always:
However,
codex.exedoes exist and is launched.---
Key observations (Process Monitor)
Using Sysinternals Process Monitor, filtering on
codex.exe:codex.exeattempts to load app-local DLLs from:``
`vendor\x86_64-pc-windows-msvc\
codexVCRUNTIME140.dll(e.g.
,codexbcrypt.dll,codexuserenv.dll`)NAME NOT FOUND``
``C:\Windows\System32\vcruntime140.dll
C:\Windows\System32\bcrypt.dll
C:\Windows\System32\userenv.dll
C:\Windows\System32\cryptbase.dll
C:\Windows\System32\sspicli.dll
This exact fallback behavior also occurs on machines where Codex works.
---
Where it fails
On the broken machine (post Windows Update):
os error 2This strongly suggests a Windows runtime / loader / VC++ runtime issue, not a missing file.
---
Conclusion
vendorcodex.exeduring native initialization on WindowsBetter diagnostics around native process startup on Windows would help, as the current error message is misleading.
We haven't heard reports of this from other Windows users, so I don't think this is a general issue with Codex. It's likely something that's specific to your system or configuration. I don't think there's much more we can do to help diagnose this.
One additional thought... perhaps the Visual Studio dependencies is corrupt on your system. Follow these instructions to reinstall.
i have the same issue
I FOUND THE FIX TO THE PROBLEM!!!!
Issue Resolution Report: Codex Launch Failure
Problem Identified
Changes Made
Resolution
@etraut-openai
@emmanQabe
@carldebilly, nice find! We should be able to detect that and provide a better error message. Reopening the issue.
The next version of the Codex CLI will have a better error message for this case.