Codex VS Code Extension - Native executable crashes before startup (Windows 11 / Ryzen 7 9800X3D)

Summary

The Codex VS Code extension never finishes loading because the bundled native executable (codex.exe) crashes immediately during startup.

The issue occurs before authentication, before any network requests are made, and before the extension finishes initialization.

After extensive debugging, I confirmed that the problem is not related to VS Code, the extension host, authentication, network connectivity, or my ChatGPT account. The bundled executable itself fails when launched directly from the command line.


Environment

Operating System

  • Windows 11 Pro
  • Version 24H2
  • Build 26200.8655

Visual Studio Code

  • Version: 1.128.0

Extension

  • Extension: openai.chatgpt
  • Version: 26.707.31428

Hardware

CPU

  • AMD Ryzen 7 9800X3D

GPU

  • NVIDIA GeForce RTX 5070

Motherboard

  • ASUS TUF GAMING B650M-E WIFI

BIOS

  • Version: 3841
  • Release Date: 2026-02-24

Expected Behavior

Opening the Codex sidebar should initialize the extension and display the ChatGPT authentication screen.


Actual Behavior

The sidebar remains indefinitely on the loading screen (OpenAI logo).

The authentication screen never appears.

No requests are sent to the authentication endpoints.


Reproduction

  1. Install the latest version of Visual Studio Code.
  2. Install the latest OpenAI Codex extension.
  3. Open the Codex sidebar.
  4. Observe that it remains permanently on the loading screen.

Most Important Finding

Running the bundled executable directly reproduces the failure without involving VS Code.

Executable:


codex.exe

Command:


codex.exe --version

Output:


Fatal Error:
HW capability found: 0x178BFBFF 0xFED8320B,
but HW capability requested: 0x20000000 0x00.

The exact same error occurs with:


codex.exe

and


codex.exe --help

Therefore the native executable itself never starts successfully.


Troubleshooting Performed

I tested all of the following:

  • Reinstalled Visual Studio Code.
  • Deleted all VS Code settings.
  • Deleted the extension cache.
  • Installed only the OpenAI extension.
  • Started VS Code using --disable-extensions.
  • Started VS Code with a completely fresh user profile (--user-data-dir).
  • Verified that Microsoft Edge WebView2 is installed.
  • Verified that network connectivity is working.
  • Verified that the OpenAI API is reachable.
  • Compared against another Windows PC using the same account.
  • Verified BIOS version and motherboard model.

None of these changed the behavior.


Network Verification

The machine has normal Internet connectivity.

Running:


curl https://api.openai.com/v1/models

returns the expected authentication error (“Missing bearer authentication”), confirming that the OpenAI API is reachable.

During extension startup, no authentication requests are initiated because the native executable terminates before initialization.


Comparison With Another Machine

I tested the exact same setup on another computer.

Same:

  • ChatGPT account
  • VS Code version
  • Extension version

On the other machine, Codex initializes correctly and displays the login screen.

The problem only occurs on this machine.


Extension Behavior

Based on the investigation, the startup sequence appears to be:


VS Code

↓

Extension activates

↓

Extension launches codex.exe

↓

codex.exe immediately exits with a fatal hardware capability error

↓

Extension waits indefinitely

↓

Sidebar remains stuck on loading

Observations

The issue appears to occur before:

  • Authentication
  • API communication
  • Extension UI initialization
  • Normal extension logic

The failure happens entirely inside the bundled native executable.


Request

Could the engineering team investigate the hardware capability detection performed during startup?

The executable consistently terminates with:


Fatal Error:
HW capability found: 0x178BFBFF 0xFED8320B,
but HW capability requested: 0x20000000 0x00.

This happens on an AMD Ryzen 7 9800X3D running Windows 11 24H2.

Since the executable crashes outside VS Code as well, it appears to be a native runtime or CPU feature detection issue rather than a VS Code extension issue.

Troubleshooting / Fix Attempts

I have been investigating this issue extensively on my Windows system. The problem occurs when the Codex VS Code extension tries to start the Codex app-server with Windows sandboxing enabled.

Here is what I have tested so far:

  • Tested multiple Codex CLI versions.

    • 0.154.0 → fails with the HW capability error.
    • 0.104.0 → works correctly from the command line.
    • The current VS Code extension contains codex-cli 0.154.0-alpha.6.2, which starts successfully when executed directly.
  • Investigated the original error:

    
    
    Fatal Error: HW capability found: 0x178BFBFF 0xFED8320B,
    but HW capability requested: 0x20000000 0x00.
    
  • Verified that the system is running:

    
    
    AMD Ryzen 7 9800X3D
    Windows 10 Pro
    OS Build 26200
    
  • Found that OPENSSL_ia32cap was set globally to:

    
    
    0x20000000
    

    I removed the environment variable and the corresponding registry value was also investigated. After restarting Windows, both the global Codex CLI and the Codex binary bundled with the VS Code extension were able to run successfully.

  • Verified that the new extension binary works:

    
    
    codex-cli 0.154.0-alpha.6.2
    
  • The Codex extension was updated to:

    
    
    openai.chatgpt-26.908.40401-win32-x64
    
  • The Windows sandbox setup successfully created:

    
    
    CodexSandboxOffline
    CodexSandboxOnline
    CodexSandboxUsers
    
  • The sandbox directory and command runner were also created:

    
    
    C:\Users\Gabriel\.codex\.sandbox-bin\
    codex-command-runner-0.154.0-alpha.6.2.exe
    
  • The sandbox setup log initially reported:

    
    
    helper_sandbox_lock_failed
    SetNamedSecurityInfoW sandbox dir failed: 5
    

    but subsequent setup attempts completed successfully with:

    
    
    setup refresh: processed 0 write roots (read roots delegated); errors=[]
    
  • Verified the ACLs on .sandbox-bin. The sandbox users have read/execute access, while SYSTEM, Administrators, and my Windows account have modify access.

  • Verified that both sandbox users exist and are members of CodexSandboxUsers.

  • Verified that cmd.exe and Windows PowerShell exist at their expected absolute paths.

  • Removed WindowsApps from the PATH temporarily to rule out command resolution issues. The problem remained.

  • Tested the sandbox directly using the absolute path to cmd.exe:

    
    
    CreateProcessAsUserW failed: 2
    
  • Tested again using the absolute path to Windows PowerShell:

    
    
    CreateProcessAsUserW failed: 2
    

The important point is that the executable being launched definitely exists. For example:


C:\Windows\System32\cmd.exe
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe

However, the Codex sandbox still fails at:


CreateProcessAsUserW failed: 2
(The system cannot find the file specified.)

The same behavior occurs with both elevated and unelevated sandbox modes.

Current status

At this point, the Codex CLI itself launches successfully, and the Windows sandbox provisioning appears to complete, but the sandbox cannot successfully create the child process through CreateProcessAsUserW.

The VS Code extension consequently reports:


Codex app-server process exited unexpectedly

and:


Codex process is not available

So the remaining issue appears to be specifically related to the Windows sandbox / CreateProcessAsUserW process creation path, rather than the Codex executable itself.

I would appreciate any guidance on what Windows component, token/profile configuration, or sandbox requirement could cause CreateProcessAsUserW to return ERROR_FILE_NOT_FOUND (2) when the target executable exists at an absolute path.

Hi @brennogfs, sorry for the delayed response. Thanks for sharing the detailed troubleshooting.

Your latest update shows that the original hardware capability error was resolved, but the Windows sandbox is still unable to start the required process.

Please review the official Windows sandbox guide.

If the issue continues, contact OpenAI Support through help.openai.com. Include your Windows, VS Code, Codex extension and CLI versions, the complete error message, and the CODEX_HOME/.sandbox/sandbox.log file in the private Support request.

Please review the log for sensitive information before sharing it, and do not include anything from .sandbox-secrets.

-Felenciya