Skip to content

Codex cli silently exits on fresh windows installs #16209

Closed as not planned
Closed as not planned

Description

@JKamsker

What version of Codex CLI is running?

v0.117.0

What subscription do you have?

pro

Which model were you using?

No response

What platform is your computer?

Microsoft Windows NT 10.0.26200.0 x64

What terminal emulator and version are you using (if applicable)?

WT, Pwsh 7.6

What issue are you seeing?

starting "codex" didnt do anything. no ui, no error - nothing:

PS C:\Users\Jonas>  npm install -g @openai/codex@latest

changed 2 packages in 1s
PS C:\Users\Jonas> codex
PS C:\Users\Jonas> codex

What steps can reproduce the bug?

  • Install fresh windows
  • Install nvm
  • Install npm: nvm install latest && nvm use latest
  • type "codex"

What is the expected behavior?

codex opens

Additional information

Seems like some deps were missing.
Kinda awkward i had claude code fix the bug for me:

 Description:

  When the Visual C++ Redistributable (UCRT) is not installed, codex fails with a confusing error that gives no indication of
  the actual problem:

  C:/nvm4w/nodejs/node.exe: error while loading shared libraries: ?: cannot open shared object file: No such file or directory

  The root cause is that the native binary (codex.exe from @openai/codex-win32-x64) depends on
  api-ms-win-crt-utility-l1-1-0.dll, which is part of the Visual C++ Redistributable. When that DLL is missing, the error
  surfaces through the Node.js shim and doesn't mention the actual missing DLL at all.

  Steps to reproduce:

  1. Windows 11 machine without Visual C++ Redistributable installed
  2. npm install -g @openai/codex@latest
  3. codex -h

  Expected behavior:

  A clear error message like: "Missing required dependency: Visual C++ Redistributable. Install it from
  https://aka.ms/vs/17/release/vc_redist.x64.exe"

  Actual behavior:

  Opaque shared library error with ? as the library name.

  Suggested fixes:

  - Add a pre-flight check in codex.js that attempts to spawn the native binary and catches the failure with a user-friendly
  message pointing to the VC++ Redistributable
  - Document the Visual C++ Redistributable as a prerequisite in the Windows installation instructions
  - Consider statically linking the CRT (/MT) in the native binary to avoid this dependency entirely

  Environment:
  - OS: Windows 11 Pro (10.0.26200)
  - Node: v25.8.2 (via nvm4w)
  - Codex: @openai/[email protected]

Activity

  1. added
    bug
    on Mar 30, 2026
  2. added
    CLI
    windows-os
    on Mar 30, 2026
  3. github-actions commented on Mar 30, 2026

    @github-actions
    Contributor

    Potential duplicates detected. Please review them and close your issue if it is a duplicate.

    Powered by Codex Action

  4. etraut-openai commented on Mar 30, 2026

    @etraut-openai
    Contributor

    Yes, you need to have these dependencies installed. See the troubleshooting section of the documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    CLIbugwindows-os

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions