Windows Desktop: code-mode host exited during handshake, bundled node.exe fails with 0xC0000022
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_
2 Comments
Environment
26.820.7780.00.150.0-alpha.810.0.22621 x64v24.19.0Problem
Local command/file execution in ChatGPT Desktop consistently fails with:
Examples that fail from Desktop include:
Get-Locationand reading local project files such as:
F:\AI_Chat\AI自构建模拟世界\界面.pngKey diagnostic
ChatGPT Desktop repeatedly fails when trying to execute its bundled Node runtime:
Desktop log:
3221225506 = 0xC0000022.However, the exact same node.exe works normally when launched manually from PowerShell:
Result:
The bundled Node executable also has a valid Authenticode signature:
Important observation
The main Desktop -> Codex app-server startup succeeds.
Desktop log shows:
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:
The following executables all have valid Authenticode signatures:
codex-code-mode-host.exe --helpexit code:0codex-command-runner.execan also start manually and exits with the expected: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:
.codexAfter launching ChatGPT Desktop in this completely clean environment, the same error still occurred:
Therefore the problem does not appear to be caused by:
All original state was restored afterward.
Reinstall / workaround testing
Also tested:
None of these fixed the issue.
Setting:
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:
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:
However, Desktop logs explicitly show that Desktop launches its bundled Codex:
not the npm wrapper.
The Desktop bundled helpers and
.codex\plugins\.plugin-appserverhelpers 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:
while:
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.
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action