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

Open 💬 2 comments Opened Aug 26, 2026 by CloudyRiver9
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

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_

View original on GitHub ↗

2 Comments

CloudyRiver9 · 1 day ago

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

Examples that fail from Desktop include:

Get-Location

and reading local project files such as:

F:\AI_Chat\AI自构建模拟世界\界面.png

Key diagnostic

ChatGPT Desktop repeatedly fails when trying to execute its bundled Node runtime:

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

Desktop log:

nodeVersionError={"code":3221225506,"killed":false,"signal":null,...}
nodeVersionStatus=failed

3221225506 = 0xC0000022.

However, the exact same node.exe works normally when launched manually from PowerShell:

$node = "C:\Users\c\AppData\Local\OpenAI\Codex\runtimes\cua_node\950613ca46815e82\bin\node.exe"
& $node --version
"ExitCode = $LASTEXITCODE"

Result:

v24.19.0
ExitCode = 0

The bundled Node executable also has a valid Authenticode signature:

Status: Valid
Signer: OpenAI OpCo, LLC

Important observation

The main Desktop -> Codex app-server startup succeeds.

Desktop log shows:

stdio_transport_spawned ... codex.exe
initialize_handshake_result ... outcome=success

So the failure is not the main Codex app-server handshake.

The failure appears later in the Desktop local execution / code-mode runtime child-process chain.

Additional verification

The following all work normally:

  • bundled codex.exe
  • codex sandbox cmd.exe
  • codex sandbox powershell.exe
  • codex-code-mode-host.exe --help
  • manual launch of bundled node.exe
  • local project directory access from PowerShell

The following executables all have valid Authenticode signatures:

  • codex-code-mode-host.exe
  • codex-command-runner.exe
  • codex-windows-sandbox-setup.exe
  • bundled node.exe

codex-code-mode-host.exe --help exit code: 0

codex-command-runner.exe can also start manually and exits with the expected:

Error: runner: no pipe-in provided

when invoked without its parent-provided pipe.

Clean-room test

I performed a complete clean-room reset.

The following user/runtime/cache state was moved aside and regenerated from scratch:

  • .codex
  • Codex runtime cache
  • Desktop/Codex local state
  • Desktop logs/state
  • related Codex user configuration
  • npm Codex was temporarily isolated

After launching ChatGPT Desktop in this completely clean environment, the same error still occurred:

node.exe --version
-> 3221225506 / 0xC0000022

Therefore the problem does not appear to be caused by:

  • .codex configuration
  • old sessions
  • runtime cache corruption
  • plugin state
  • npm Codex contamination
  • project-specific configuration

All original state was restored afterward.

Reinstall / workaround testing

Also tested:

  • completely reinstalling ChatGPT Desktop
  • disabling code_mode_host
  • Defender exclusions for ChatGPT/Codex helper executables
  • temporarily stopping Nahimic/A-Volute service

None of these fixed the issue.

Setting:

[features]
code_mode_host = false

did not restore local execution/file access.

Windows process mitigation check

The running ChatGPT.exe process does not appear to block child-process creation.

Relevant results:

BinarySignature:
    MicrosoftSignedOnly      : OFF
    AllowStoreSignedBinaries : OFF

DynamicCode:
    BlockDynamicCode : OFF

Child Process:
    DisallowChildProcessCreation : OFF

So this does not appear to be caused by a standard Windows Exploit Protection child-process restriction.

Multiple Codex installations

An npm Codex installation also exists:

codex-cli 0.150.0-alpha.8

However, Desktop logs explicitly show that Desktop launches its bundled Codex:

C:\Users\c\AppData\Local\OpenAI\Codex\bin\d0097be4feba73d0\codex.exe

not the npm wrapper.

The Desktop bundled helpers and .codex\plugins\.plugin-appserver helpers have identical SHA256 hashes.

The npm helpers are different binary builds, despite reporting the same CLI version, but there is currently no evidence that Desktop is invoking the npm helper paths.

Expected behavior

ChatGPT Desktop should be able to launch its bundled local execution runtime and execute local commands/files.

Actual behavior

The Desktop local execution host exits during handshake.

The most reproducible low-level symptom is:

Desktop -> bundled node.exe --version
-> 0xC0000022

while:

PowerShell -> exact same bundled node.exe --version
-> success

Suspected area

This appears to be specific to the Windows ChatGPT Desktop packaged/MSIX child-process execution context or the Desktop -> code-mode/local-runtime initialization path.

The binaries themselves, PowerShell, Codex CLI, sandbox, project path, signatures, user config, runtime cache, and reinstall have all been independently verified.

I can provide full Desktop logs and additional Process Monitor traces if needed.

github-actions[bot] contributor · 1 day ago

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

  • #40899
  • #40798

Powered by Codex Action