Repository navigation
Description
What version of the Codex App are you using (From “About Codex” dialog)?
OpenAI.Codex_26.820.7780.0_x64__2p2nqsd0c76g0
What subscription do you have?
PLUS
What platform is your computer?
Microsoft Windows NT 10.0.26200.0 x64
What issue are you seeing?
After updating Codex Desktop to 26.820.7780.0, all new local tasks fail before any command is executed.
Observed user-facing errors include:
Unable to read: local execution environment failed to start.
Unable to read: local command execution service handshake failed.
One observed underlying error was:
failed to spawn code-mode host
C:\Users<redacted>\AppData\Local\OpenAI\Codex\bin\d0097be4feba73d0\codex-code-mode-host.exe:
The system cannot find the file specified. (os error 2)
The regression is specific to this Windows machine after upgrading to 26.820. The root cause is not yet known.
What steps can reproduce the bug?
- Use a working Codex Desktop installation on Windows 10.0.26200.0.
- Update the app to 26.820.7780.0.
- Create a new local task.
- Request a trivial local command, such as listing a directory.
- Observe that local execution fails during startup or handshake, before the command runs.
The issue persists after:
- Restarting Windows
- Windows repair operations
- A clean Codex configuration test
- Recreating the CUA Node runtime
What is the expected behavior?
After an in-app update, a new local task should start normally and execute basic commands.
If a required local runtime component is unavailable, Codex should report the exact missing component and provide an automatic repair path instead of failing every local task with a generic startup or handshake error.
Additional information
I compared the affected PC with another PC where 26.820.7780.0 works normally:
- Same Windows build
- Same Codex App version
- Same codex.exe hash
- Same node_repl.exe hash
- Configured named pipe matched the actual running named pipe on both PCs
Therefore, this does not appear to be a universally broken 26.820 release, but it is a reproducible machine-specific or state-specific regression triggered by the update.
Rolling back to the previous 26.818.61809 build restored local execution after completing the rollback procedure.
Please advise what additional diagnostics would be useful. I can provide sanitized Codex Desktop logs and process details.
Activity
github-actions commentedon Aug 27, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
MilkyWay008 commentedon Aug 27, 2026
The
failed to spawn code-mode-host ... d0097be4feba73d0\codex-code-mode-host.exe: The system cannot find the file specified (os error 2)is a missing-binary issue, not a config one, which is why the clean-config test didn't help. That hash subfolder not existing on disk after an update usually means AV quarantine or a half-extracted update, worth checking Defender's quarantine history for the codex bin path before reinstalling. If you have a second machine on the same build, copying the whole%LOCALAPPDATA%\OpenAI\Codex\bin\folder over fixes it in minutes, I did exactly that once when an update dropped a helper. oh, btw, in case it might help that, I built a portable Hermes OTG repo, check it, imo it may be able to help you diagnose and figure out the fix in no time. https://github.com/MilkyWay008/Hermes-OTGzemeng5208 commentedon Aug 27, 2026
This looks like a good match for the local runtime/helper materialization layer rather than a config-only failure: the app is trying to spawn
%LOCALAPPDATA%\OpenAI\Codex\bin\d0097be4feba73d0\codex-code-mode-host.exe, but that helper is not present after the update, while another machine on the same Desktop build works.I maintain WinBridge Recovery: https://github.com/zemeng5208/winbridge-recovery
For this specific failure it can help diagnose/recover the per-user Codex runtime/helper staging layer: whether the expected hash/version directory exists, whether
codex.exe/codex-code-mode-host.exe/ related helpers were only partially materialized, whether stale.staging-*state or a file lock interrupted activation, and whether the user-side copies still match the currently installed official MSIX resources.The important limitation is that this only addresses local state/materialization problems. It does not modify
WindowsApps, bypass package protection, or guarantee a fix. If the current Desktop build itself is selecting the wrong helper hash/path, or repeatedly fails to materialize a valid helper from an Application Protected/EFS source, that remains an upstream Codex relocation/update bug and needs an OpenAI-side fix.micizi95 commentedon Aug 27, 2026
I’m also seeing the Windows-side regression after the recent Codex update, with symptoms beyond the GPT-5.6 tool-call failure:
I added the GPT-5.6-specific reproduction to #41049 as well. This report is to confirm that the startup/chat-loading slowdown is also present on an affected Windows installation after the recent update.
Please consider whether these symptoms share the same 26.820 runtime/local-execution regression or represent two overlapping regressions. If there are diagnostic logs that would help isolate startup/chat loading versus code-mode host/tool-call failures, please document the recommended collection steps.
InvisibleSix commentedon Aug 28, 2026
@MilkyWay008 @zemeng5208
I reproduced the issue again with OpenAI.Codex 26.820.9563.0 and collected additional evidence.
Important correction
The previously observed “missing
codex-code-mode-host.exe” condition occurred later during a rollback/cache-version mismatch. It should not be treated as the confirmed root cause of the original 26.820 local-execution regression.In the current clean reproduction, the host executable is present and valid.
Reproduction results
OpenAI.Codex_26.820.9563.0_x64__2p2nqsd0c76g0Local execution environment failed to startLocal command execution service handshake failedcode-mode host exited during handshakeThe active app-server process was:
It was launched with:
Host executable integrity
The host executable exists in both locations:
Both copies have the same SHA-256 hash:
Both Authenticode signatures report:
This rules out a missing host file, a corrupted MSIX copy, and a damaged per-user materialized copy in this reproduction.
Process monitoring result
A short-interval process monitor captured the host process:
The decimal
ExitCodefield was blank in the collector, so I do not want to overstate the exact exit status. However, the process was definitely created from the expected path and then disappeared during the handshake window.There were no matching Windows Application events from:
1000)1001)1026)This does not look like a normal unhandled Windows crash. The current evidence suggests that the host starts successfully but exits before completing its parent/child handshake.
Security-software check
Current assessment
The problem appears to be in the code-mode host initialization or handshake path, rather than MSIX installation or helper-file materialization.
A possible failure mode is that the host does not receive or retain the expected IPC/stdio/pipe handshake channel and exits early, while the parent
codex.exereportscode-mode host exited during handshake. This is an inference from the observed behavior, not a confirmed source-level root cause.Could a maintainer advise:
codex-code-mode-host.exestartup/handshake logging?I can provide sanitized desktop logs, AppX deployment events, hashes, signatures, and additional process traces if needed.
InvisibleSix commentedon Aug 28, 2026
@micizi95
Additional controlled A/B result:
On the same affected Windows machine, with the same Codex Desktop installation, project, configuration, and security software state:
GPT-5.6 consistently fails to execute local tasks with the code-mode host handshake error.
Switching the same workload to GPT-5.5 restores local command execution immediately.
Rolling back Codex Desktop from 26.820.x to 26.818.x also restores normal operation.
This matches the model-specific behavior reported in #41049, #32759, and #38187.
Given that both copies of codex-code-mode-host.exe were present, had identical SHA-256 hashes, valid signatures, and the process was observed starting, this no longer appears to be a missing-file or antivirus-quarantine issue. It appears to be a GPT-5.6/code-mode compatibility regression in the newer runtime.
InvisibleSix commentedon Aug 28, 2026
I performed an additional comparison between the working 26.818 build and the affected 26.820 build. The evidence suggests that this is not simply a missing executable or antivirus quarantine, but a regression in the newer local execution path used by GPT-5.6.
Controlled comparison:
GPT-5.6 local execution works.
GPT-5.6 fails during the Code Mode Host handshake, while GPT-5.5 works.
The same Windows account, workspace, configuration, and security-software state were used.
On 26.820:
codex-code-mode-host.exeexisted in both the App package and per-user cache.F081067C03AE746C22BED3B5106C2CF9C3EB3448E835E218DFCDAFAAF8569ED9I also compared the corresponding bundled Codex CLI versions. Between these builds, the model shell backend changed from
shell_commandtounified_exec.The relevant source change is:
8a40095
This commit, “Standardize shell execution on unified exec (#39757),” modified 116 files, removed the legacy shell-command backend and fallback path, and standardized local command execution on
unified_exec.GPT-5.6 remained configured with:
tool_mode: code_mode_onlyuse_responses_lite: trueGPT-5.5 does not use the same
code_mode_onlyroute. This explains why switching only the model changes the result on the same affected installation.Another relevant change increased the local Code Mode Host startup timeout from 10 to 30 seconds:
275ef85
The corresponding source returns
code-mode host exited during handshakewhen the spawned Host process exits before producing the expected handshake data.Current assessment:
The strongest hypothesis is a Windows regression in the
unified_execinitialization or integration path when invoked through the GPT-5.6 Code Mode Host.The exact internal exit point is not yet confirmed because the Host does not emit a useful crash or handshake diagnostic. However, the controlled 26.818 versus 26.820 comparison isolates the regression to the newer Desktop/CLI runtime and its local execution changes.
Current workarounds:
karumeno commentedon Sep 1, 2026
A workaround that fixed this on my Windows machine:
Check this registry value:
If it is
0, set it back to1, then fully quit and restart Codex Desktop.Administrator PowerShell:
After doing this,
code-mode host exited during handshakedisappeared for me and GPT-5.6 local tool execution worked again.This seems consistent with the
0xC0000022/ package-localdbghelp.dllpath described in #40913 and theSafeDllSearchModeworkaround reported in #40798. It is not an official fix, but it restores the Windows default Safe DLL Search Mode.InvisibleSix commentedon Sep 1, 2026
@jacinter I couldn't fix the problem, and it seems to be a low-probability one,so I fully reinstall my Windows 11, with my disk getting formate.😄Next time run into this, I will try it,thanks~
micizi95 commentedon Sep 1, 2026
@InvisibleSix Just to clarify your latest update: after the full Windows 11 reinstall/drive format, is the original Codex Desktop GPT-5.6 issue now completely gone on your machine? In particular, can GPT-5.6 now execute local commands/tools normally without
code-mode host exited during handshake, and did the slow startup/chat-loading behavior also disappear? It would be very helpful to know whether the reinstall actually resolved the original regression or whether you simply haven't reproduced it again yet.zemeng5208 commentedon Sep 1, 2026
Correction after reviewing the later controlled reproductions in this thread: my previous wording overemphasized the earlier missing-file observation.
The reporter has since established that the missing
codex-code-mode-host.exestate occurred during a rollback/cache-version mismatch and is not the confirmed cause of the original regression. In the clean26.820.9563.0reproduction:That evidence places the clean reproduction outside WinBridge Recovery's local repair scope. WinBridge can diagnose missing/partial user-side runtime materialization, staging, ACL/file-lock, or EFS copy failures, but those layers were already shown healthy here. Rebuilding them would not be a justified recommendation.
The stronger current interpretation is an upstream GPT-5.6/code-mode/unified-exec handshake compatibility regression, or the separate DLL-search behavior discussed later in the thread. WinBridge does not patch the host, alter
WindowsApps, or change model/runtime protocol behavior, and I do not claim it can repair this clean reproduction.I maintain WinBridge Recovery under the
zemeng5208account and am editing this comment to keep that limitation explicit: https://github.com/zemeng5208/winbridge-recoveryInvisibleSix commentedon Sep 2, 2026
@micizi95 Yes,after the OS reinstalled, codex app now works totally fine. There is no any other problem with chatgpt work mode.
As the slow startup/chat-loading issuses,I barely noticed it before the reinstall action, so only can I say is the app now loading everything normally.👋
cleanlove2y commentedon Sep 2, 2026
Confirmed on 26.831.21537 — same missing helper in d0097be4feba73d0, and manually copying the helpers fully fixes it
App version: Powered by Codex & OWL 26.831.21537 (released 2026-09-02), ChatGPT subscription, Windows 10.0.26200 x64.
After updating today, every local tool call failed with exactly the error reported here:
(from ~/.codex/logs_2.sqlite)
Diagnosis — this looks like a deployment bug, not corruption:
helpers.
So the update downloaded and staged the new helpers, but the running app-server still resolves helpers relative to the old directory (d0097be4feba73d0), which was never provisioned. This is consistent
with #32655.
Fix that worked for me:
Local execution is fully restored — commands, file reads, everything. No handshake errors afterwards, so the Aug 30 host works fine against the Aug 26 app-server binary on this machine.
Note that uninstall/reinstall and the Windows "Repair" option do not fix this (reinstalling just re-stages the new directory), which matches what other reporters observed. Also matches #40817, where the
same missing helper pattern appeared under ~/.codex/.sandbox-bin.
M4XXSH4DY commentedon Sep 19, 2026
I can reproduce the same failure on a current Windows Desktop build, and I captured the runtime transition across an actual in-app update.
Environment
10.0.26200OpenAI.Codex_26.915.3509.0_x64__2p2nqsd0c76g0OpenAI.Codex_26.915.4065.0_x64__2p2nqsd0c76g0codex-cli 0.155.0-alpha.9.2Observed update sequence
Before the update, local execution was working from this runtime directory:
It contained all four expected signed binaries:
After updating the desktop app from
26.915.3509.0to26.915.4065.0, a new complete runtime was deployed at:The old
cdef5aaf3e41ab53runtime was then removed or cleaned up. However, an already-open task/app-server still attempted to spawn the code-mode host from the old absolute path:At that point the desktop UI was still available, but every tool-backed local operation failed before execution.
Recovery evidence
A local workaround had already been installed because earlier app updates had caused the same failure. The workaround does not modify the MSIX package. It:
%LOCALAPPDATA%\OpenAI\Codex\bin;During this update, the workaround recorded:
Repointing the junction alone did not repair the already-running task, because the existing app-server had apparently cached or resolved the old runtime path.
After fully exiting the desktop app, including the system tray process, and reopening it:
Local tool execution then worked normally again.
All four binaries in
247581e40ee272fb:OpenAI.Codex_26.915.4065.0MSIX resources;OpenAI OpCo, LLC.Interpretation
The evidence appears consistent with a runtime lifecycle/version-skew problem:
codex-code-mode-host.exefrom the deleted runtime and fail withos error 2.This resembles the stale app-server/runtime-path behavior described in #44261, although that report concerns a different platform and installation method.
This does not appear to be a corrupt
codex-code-mode-host.exe, because the new binary is present, signed, hash-matched to the MSIX package, and works after a full process restart.Expected behavior
During an app/runtime update, the desktop app should do one of the following:
The app should not leave an apparently active task permanently bound to an executable path that the updater has removed.