Windows npm install can leave Codex silently unable to launch without VC++ runtime

Open 💬 2 comments Opened May 2, 2026 by coygeek

What version of Codex CLI is running?

@openai/codex@0.128.0 / codex-cli 0.128.0

What subscription do you have?

_No response_

Which model were you using?

Not reached; the CLI failed before opening normally.

What platform is your computer?

Fresh/latest Windows 11 machine:

Microsoft Windows [Version 10.0.26200.8246]

Node/npm installed first:

node v24.15.0
npm 11.12.1

What issue are you seeing?

On a fresh Windows 11 setup, installing Codex via npm appeared to succeed, but running codex did nothing / failed silently from the user's perspective.

After investigation, the npm install itself was successful. The generated npm shims and Windows x64 Codex package were present:

C:\Users\win\AppData\Roaming\npm\codex.ps1
C:\Users\win\AppData\Roaming\npm\node_modules\@openai\codex
C:\Users\win\AppData\Roaming\npm\node_modules\@openai\codex\node_modules\@openai\codex-win32-x64

The actual launch failure was the native Windows binary exiting immediately with status -1073741515:

codex --version
# exit=-1073741515

cmd /c codex --version
# exit=-1073741515

C:\Users\win\AppData\Roaming\npm\node_modules\@openai\codex\node_modules\@openai\codex-win32-x64\vendor\x86_64-pc-windows-msvc\codex\codex.exe --version
# exit=-1073741515

On Windows, that is 0xC0000135, which indicates a required DLL was missing. The machine did not have the Visual C++ runtime DLLs installed, including:

vcruntime140.dll
vcruntime140_1.dll
msvcp140.dll

It also had no installed Microsoft Visual C++ Redistributable entry.

What steps can reproduce the bug?

On a fresh Windows 11 machine without the Visual C++ Redistributable installed:

  1. Install Node/npm.
  2. Install Codex:

``powershell
npm i -g @openai/codex
``

  1. Run Codex:

``powershell
codex
``

  1. Observe that nothing useful appears to happen from the user's perspective.
  2. Check the binary directly and observe exit code -1073741515 / 0xC0000135.

What is the expected behavior?

One of:

  1. The npm package should include or avoid the missing runtime dependency, if feasible.
  2. The installer or launcher should detect the missing Microsoft Visual C++ runtime and print a clear actionable error.
  3. The Windows installation documentation should explicitly list the Microsoft Visual C++ Redistributable as a prerequisite.

A silent/no-output launch failure makes the npm install look broken even though the missing dependency is outside npm.

What is the workaround?

Installing the Microsoft Visual C++ 2015+ x64 redistributable fixed the issue:

winget install --id Microsoft.VCRedist.2015+.x64 --exact --source winget --accept-package-agreements --accept-source-agreements

After that, the expected runtime DLLs appeared in C:\Windows\System32, and all launch paths succeeded:

codex --version
# codex-cli 0.128.0
# exit=0

cmd /c codex --version
# codex-cli 0.128.0
# exit=0

C:\Users\win\AppData\Roaming\npm\node_modules\@openai\codex\node_modules\@openai\codex-win32-x64\vendor\x86_64-pc-windows-msvc\codex\codex.exe --version
# codex-cli 0.128.0
# exit=0

Installed runtime afterward:

Microsoft Visual C++ v14 Redistributable (x64) - 14.50.35719

Additional information

The npm debug logs showed successful installs of @openai/codex@0.128.0 and @openai/codex-win32-x64@0.128.0-win32-x64; this was not an npm package fetch/install failure. The failure was only at native binary launch time.

Suggested product fix: have the Windows launcher catch 0xC0000135 / missing DLL startup failures and print something like:

Codex could not start because the Microsoft Visual C++ runtime is missing.
Install it with:
winget install --id Microsoft.VCRedist.2015+.x64 --exact --source winget

That would turn a confusing silent failure into a one-command fix.

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗