openai / openai/codex

Windows Desktop: code-mode host exited during handshake, bundled node.exe fails with 0xC0000022

Open
#40,913 9 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

app bug tool-calls windows-os
Dominant language
Rust
Stars
125k
Forks
19.4k
PR merge metrics
PR metrics pending

Description

What version of the Codex App are you using (From “About Codex” dialog)?

20260827new update

What subscription do you have?

no

What platform is your computer?

windows

What issue are you seeing?

Environment

ChatGPT Desktop: 26.820.7780.0
Codex CLI: 0.150.0-alpha.8
Windows 11: 10.0.22621 x64
Bundled Node.js: v24.19.0

Problem

Local command/file execution in ChatGPT Desktop consistently fails with:

code-mode host exited during handshake

The Desktop app is unable to reliably execute local commands such as Get-Location or read local project files.

Key diagnostic finding

ChatGPT Desktop repeatedly tries to execute its bundled Node runtime:

C:\Users\c\AppData\Local\OpenAI\Codex\runtimes\cua_node\950613ca46815e82\bin\node.exe --version

and receives:

nodeVersionError.code = 3221225506
0xC0000022
stdout = ""
stderr = ""

0xC0000022 corresponds to an access-denied status.

However, executing the exact same bundled node.exe manually from PowerShell succeeds:

v24.19.0
ExitCode = 0

This indicates that the executable itself works, while its launch from the ChatGPT Desktop process context fails.

Additional verification

The following have all been tested successfully:

  • Bundled codex.exe starts and works normally.
  • Main Desktop → codex app-server initialization handshake succeeds.
  • codex sandbox cmd.exe works.
  • codex sandbox powershell.exe works.
  • codex-code-mode-host.exe --help works and exits with code 0.
  • codex-command-runner.exe starts and responds as expected when manually invoked.
  • Authenticode signatures for:
    codex-code-mode-host.exe
    codex-command-runner.exe
    codex-windows-sandbox-setup.exe
    bundled node.exe
    are all Valid.
  • Bundled node.exe is signed by OpenAI OpCo, LLC.
  • Project directory exists and is an ordinary local directory.
  • ChatGPT process mitigation settings do not prohibit child-process creation or require Microsoft-only signed binaries.

Troubleshooting already performed

  • Completely reinstalled ChatGPT Desktop.
  • Performed a clean-room reset of all Codex/Desktop user state and caches.
  • Temporarily isolated the npm Codex installation.
  • Re-created all Desktop/Codex runtime state from scratch.
  • Disabled features.code_mode_host in config.toml.
  • Added Defender exclusions for ChatGPT/Codex/helper executables.
  • Temporarily stopped Nahimic/A-Volute services.

None of the above resolved the issue.

The clean-room test is particularly important: even with all user configuration/runtime/cache state removed and npm Codex isolated, Desktop still produced the same:

node.exe --version
→ 3221225506 / 0xC0000022

Other observations

Windows Code Integrity logs contain repeated Event ID 3033 entries involving Nahimic/A-Volute DLL injection attempts into ChatGPT.exe, but disabling the Nahimic service did not resolve the problem, so this does not appear to be the primary cause.

No corresponding normal Application Error / WER crash for the bundled Node or code-mode host was observed.

The CLI execution path remains functional; the failure appears specific to the ChatGPT Desktop packaged-process / child-process launch context.

Expected behavior

ChatGPT Desktop should be able to launch its bundled Node/code-mode runtime and perform local command and file operations.

Actual behavior

The Desktop-local execution host exits during handshake, and bundled node.exe --version fails only when invoked from the Desktop context with:

3221225506 (0xC0000022)

while the exact same binary executes normally when started manually.

Suspected area

This appears to be related to the Windows ChatGPT Desktop/MSIX packaged-process child-process environment or the Desktop → local code-mode runtime initialization path, rather than a broken Node/Codex binary or user configuration.

What steps can reproduce the bug?

Environment

ChatGPT Desktop: 26.820.7780.0
Codex CLI: 0.150.0-alpha.8
Windows 11: 10.0.22621 x64
Bundled Node.js: v24.19.0

Problem

Local command/file execution in ChatGPT Desktop consistently fails with:

code-mode host exited during handshake

The Desktop app is unable to reliably execute local commands such as Get-Location or read local project files.

Key diagnostic finding

ChatGPT Desktop repeatedly tries to execute its bundled Node runtime:

C:\Users\c\AppData\Local\OpenAI\Codex\runtimes\cua_node\950613ca46815e82\bin\node.exe --version

and receives:

nodeVersionError.code = 3221225506
0xC0000022
stdout = ""
stderr = ""

0xC0000022 corresponds to an access-denied status.

However, executing the exact same bundled node.exe manually from PowerShell succeeds:

v24.19.0
ExitCode = 0

This indicates that the executable itself works, while its launch from the ChatGPT Desktop process context fails.

Additional verification

The following have all been tested successfully:

  • Bundled codex.exe starts and works normally.
  • Main Desktop → codex app-server initialization handshake succeeds.
  • codex sandbox cmd.exe works.
  • codex sandbox powershell.exe works.
  • codex-code-mode-host.exe --help works and exits with code 0.
  • codex-command-runner.exe starts and responds as expected when manually invoked.
  • Authenticode signatures for:
    codex-code-mode-host.exe
    codex-command-runner.exe
    codex-windows-sandbox-setup.exe
    bundled node.exe
    are all Valid.
  • Bundled node.exe is signed by OpenAI OpCo, LLC.
  • Project directory exists and is an ordinary local directory.
  • ChatGPT process mitigation settings do not prohibit child-process creation or require Microsoft-only signed binaries.

Troubleshooting already performed

  • Completely reinstalled ChatGPT Desktop.
  • Performed a clean-room reset of all Codex/Desktop user state and caches.
  • Temporarily isolated the npm Codex installation.
  • Re-created all Desktop/Codex runtime state from scratch.
  • Disabled features.code_mode_host in config.toml.
  • Added Defender exclusions for ChatGPT/Codex/helper executables.
  • Temporarily stopped Nahimic/A-Volute services.

None of the above resolved the issue.

The clean-room test is particularly important: even with all user configuration/runtime/cache state removed and npm Codex isolated, Desktop still produced the same:

node.exe --version
→ 3221225506 / 0xC0000022

Other observations

Windows Code Integrity logs contain repeated Event ID 3033 entries involving Nahimic/A-Volute DLL injection attempts into ChatGPT.exe, but disabling the Nahimic service did not resolve the problem, so this does not appear to be the primary cause.

No corresponding normal Application Error / WER crash for the bundled Node or code-mode host was observed.

The CLI execution path remains functional; the failure appears specific to the ChatGPT Desktop packaged-process / child-process launch context.

Expected behavior

ChatGPT Desktop should be able to launch its bundled Node/code-mode runtime and perform local command and file operations.

Actual behavior

The Desktop-local execution host exits during handshake, and bundled node.exe --version fails only when invoked from the Desktop context with:

3221225506 (0xC0000022)

while the exact same binary executes normally when started manually.

Suspected area

This appears to be related to the Windows ChatGPT Desktop/MSIX packaged-process child-process environment or the Desktop → local code-mode runtime initialization path, rather than a broken Node/Codex binary or user configuration.

What is the expected behavior?

No response

Additional information

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Desktop-to-local code-mode runtime initialization path and the child-process launch context described in the report. Reproduce the packaged-process invocation of bundled node.exe --version and compare it with the successful PowerShell launch, then trace the handshake failure. Done means ChatGPT Desktop launches the bundled runtime and completes local command and file operations.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js
Domain
desktop, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.