Skip to content

[Windows][26.820.7780.0] Local execution fails to start after updating Codex Desktop #41088

Open

Description

@InvisibleSix

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?

  1. Use a working Codex Desktop installation on Windows 10.0.26200.0.
  2. Update the app to 26.820.7780.0.
  3. Create a new local task.
  4. Request a trivial local command, such as listing a directory.
  5. Observe that local execution fails during startup or handshake, before the command runs.

The issue persists after:

  1. Restarting Windows
  2. Windows repair operations
  3. A clean Codex configuration test
  4. 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:

  1. Same Windows build
  2. Same Codex App version
  3. Same codex.exe hash
  4. Same node_repl.exe hash
  5. 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

  1. added
    app
    on Aug 27, 2026
  2. added
    bug
    windows-os
    tool-calls
    on Aug 27, 2026
  3. github-actions commented on Aug 27, 2026

    @github-actions
    Contributor

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

    Powered by Codex Action

  4. MilkyWay008 commented on Aug 27, 2026

    @MilkyWay008

    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-OTG

  5. zemeng5208 commented on Aug 27, 2026

    @zemeng5208

    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.

  6. micizi95 commented on Aug 27, 2026

    @micizi95

    I’m also seeing the Windows-side regression after the recent Codex update, with symptoms beyond the GPT-5.6 tool-call failure:

    • Codex Desktop now takes a very long time to launch.
    • Chats take a long time to load and can appear to hang/unresponsive.
    • Local work is unreliable on GPT-5.6, while switching the same project/chat to GPT-5.5 restores command execution.

    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.

  7. InvisibleSix commented on Aug 28, 2026

    @InvisibleSix
    Author

    @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

    • App version: OpenAI.Codex_26.820.9563.0_x64__2p2nqsd0c76g0
    • AppX deployment completed successfully.
    • Windows successfully validated and trusted the package.
    • New local tasks still fail with:
      • Local execution environment failed to start
      • Local command execution service handshake failed
      • code-mode host exited during handshake
        The active app-server process was:
    C:\Users\<user>\AppData\Local\OpenAI\Codex\bin\d5f4c71927a04589\codex.exe
    

    It was launched with:

    -c features.code_mode_host=true app-server
    

    Host executable integrity

    The host executable exists in both locations:

    C:\Program Files\WindowsApps\OpenAI.Codex_26.820.9563.0_x64__2p2nqsd0c76g0\app\resources\codex-code-mode-host.exe
    C:\Users\<user>\AppData\Local\OpenAI\Codex\bin\d5f4c71927a04589\codex-code-mode-host.exe
    

    Both copies have the same SHA-256 hash:

    F081067C03AE746C22BED3B5106C2CF9C3EB3448E835E218DFCDAFAAF8569ED9
    

    Both Authenticode signatures report:

    Status: Valid
    

    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:

    ProcessId: 3356
    Path: C:\Users\<user>\AppData\Local\OpenAI\Codex\bin\d5f4c71927a04589\codex-code-mode-host.exe
    ExitCodeHex: 0x00000000
    

    The decimal ExitCode field 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:

    • Application Error (1000)
    • Windows Error Reporting (1001)
    • .NET Runtime (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

    • Both host copies remain present and correctly signed.
    • Exiting Huorong Security did not change the result.
    • Closing other unrelated applications and services also did not resolve the failure.
    • The same machine works again immediately after rolling back to 26.818.

    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.exe reports code-mode host exited during handshake. This is an inference from the observed behavior, not a confirmed source-level root cause.

    Could a maintainer advise:

    1. How to enable detailed codex-code-mode-host.exe startup/handshake logging?
    2. Whether host stderr and the actual exit status can be surfaced in the desktop logs?
    3. Which IPC transport or inherited handles are expected during the handshake?
    4. Whether there are known 26.820 changes in the Windows code-mode-host bootstrap path?
    5. What additional trace would be most useful for identifying why the host exits before completing the handshake?

    I can provide sanitized desktop logs, AppX deployment events, hashes, signatures, and additional process traces if needed.

  8. InvisibleSix commented on Aug 28, 2026

    @InvisibleSix
    Author

    @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.

  9. InvisibleSix commented on Aug 28, 2026

    @InvisibleSix
    Author

    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:

    • Codex Desktop 26.818.8289 / bundled CLI 0.149.0-alpha.4.3:
      GPT-5.6 local execution works.
    • Codex Desktop 26.820.9563 / bundled CLI 0.150.0-alpha.8:
      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.exe existed in both the App package and per-user cache.
    • Both copies had the same SHA-256:
      F081067C03AE746C22BED3B5106C2CF9C3EB3448E835E218DFCDAFAAF8569ED9
    • Both Authenticode signatures were valid.
    • The Host process was observed starting from the expected directory.
    • It exited before completing the handshake.
    • Exiting Huorong and closing unrelated applications/services did not help.
    • Rolling back to 26.818 immediately restored GPT-5.6 local execution.

    I also compared the corresponding bundled Codex CLI versions. Between these builds, the model shell backend changed from shell_command to unified_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_only
    • use_responses_lite: true

    GPT-5.5 does not use the same code_mode_only route. 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 handshake when the spawned Host process exits before producing the expected handshake data.

    Current assessment:

    The strongest hypothesis is a Windows regression in the unified_exec initialization 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:

    • Remain on Codex Desktop 26.818; or
    • Use GPT-5.5 for local tasks on affected newer builds.
  10. karumeno commented on Sep 1, 2026

    @karumeno

    A workaround that fixed this on my Windows machine:

    Check this registry value:

    HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\SafeDllSearchMode
    

    If it is 0, set it back to 1, then fully quit and restart Codex Desktop.

    Administrator PowerShell:

    reg query "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager" /v SafeDllSearchMode
    reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager" /v SafeDllSearchMode /t REG_DWORD /d 1 /f

    After doing this, code-mode host exited during handshake disappeared for me and GPT-5.6 local tool execution worked again.

    This seems consistent with the 0xC0000022 / package-local dbghelp.dll path described in #40913 and the SafeDllSearchMode workaround reported in #40798. It is not an official fix, but it restores the Windows default Safe DLL Search Mode.

  11. InvisibleSix commented on Sep 1, 2026

    @InvisibleSix
    Author

    @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~

  12. micizi95 commented on Sep 1, 2026

    @micizi95

    @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.

  13. zemeng5208 commented on Sep 1, 2026

    @zemeng5208

    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.exe state occurred during a rollback/cache-version mismatch and is not the confirmed cause of the original regression. In the clean 26.820.9563.0 reproduction:

    • the package and per-user host executables were both present;
    • their SHA-256 hashes matched and Authenticode signatures were valid;
    • the host process started from the expected versioned directory;
    • it then exited during the handshake;
    • GPT-5.5 worked on the same machine while GPT-5.6 failed;
    • rollback to 26.818 restored GPT-5.6 execution.

    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 zemeng5208 account and am editing this comment to keep that limitation explicit: https://github.com/zemeng5208/winbridge-recovery

  14. InvisibleSix commented on Sep 2, 2026

    @InvisibleSix
    Author

    @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.👋

  15. cleanlove2y commented on Sep 2, 2026

    @cleanlove2y

    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:

      failed to spawn code-mode host                                                                                                                                                                           
      C:\Users\<user>\AppData\Local\OpenAI\Codex\bin\d0097be4feba73d0\codex-code-mode-host.exe                                                                                                                 
      The system cannot find the file specified. (os error 2)                                                                                                                                                  
    

    (from ~/.codex/logs_2.sqlite)

    Diagnosis — this looks like a deployment bug, not corruption:

    • bin\d0097be4feba73d0\ contained only codex.exe (Aug 26 build) — and this is the binary the desktop app was actually running (confirmed via Get-Process). The directory had none of the sandbox
      helpers.
    • bin\b99306303521e97e\ contained the complete new release set (Aug 30 build, matching 26.831): codex-code-mode-host.exe, codex-command-runner.exe, codex-windows-sandbox-setup.exe, codex.exe.
    • A signed copy of the full set also exists under ~.codex\plugins.plugin-appserver\ (Authenticode: Valid, OpenAI OpCo, LLC).

    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:

    1. Copy codex-code-mode-host.exe, codex-command-runner.exe, and codex-windows-sandbox-setup.exe from bin\b99306303521e97e\ into bin\d0097be4feba73d0.
    2. Fully exit the desktop app (verify no codex.exe process remains) and relaunch.

    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.

  16. M4XXSH4DY commented on Sep 19, 2026

    @M4XXSH4DY

    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

    • OS: Windows 11 Pro x64
    • Windows version: 10.0.26200
    • Previous app package: OpenAI.Codex_26.915.3509.0_x64__2p2nqsd0c76g0
    • Updated app package: OpenAI.Codex_26.915.4065.0_x64__2p2nqsd0c76g0
    • Bundled CLI after the update: codex-cli 0.155.0-alpha.9.2
    • Execution environment: Windows native
    • Installation source: Microsoft Store / MSIX

    Observed update sequence

    Before the update, local execution was working from this runtime directory:

    %LOCALAPPDATA%\OpenAI\Codex\bin\cdef5aaf3e41ab53
    

    It contained all four expected signed binaries:

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

    After updating the desktop app from 26.915.3509.0 to 26.915.4065.0, a new complete runtime was deployed at:

    %LOCALAPPDATA%\OpenAI\Codex\bin\247581e40ee272fb
    

    The old cdef5aaf3e41ab53 runtime 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:

    failed to spawn code-mode host
    C:\Users\<redacted>\AppData\Local\OpenAI\Codex\bin\cdef5aaf3e41ab53\codex-code-mode-host.exe:
    The system cannot find the file specified. (os error 2)
    

    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:

    1. scans %LOCALAPPDATA%\OpenAI\Codex\bin;
    2. finds the newest directory containing all four required executables;
    3. verifies valid OpenAI Authenticode signatures;
    4. updates the stable runtime junction to that complete directory.

    During this update, the workaround recorded:

    2026-09-19 17:02:12 Healthy: 8e8bf206e63ac436 -> cdef5aaf3e41ab53
    2026-09-19 17:07:13 Repaired: 8e8bf206e63ac436 -> 247581e40ee272fb
    

    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:

    codex.exe
      -> %LOCALAPPDATA%\OpenAI\Codex\bin\8e8bf206e63ac436\codex.exe
    
    codex-code-mode-host.exe
      -> %LOCALAPPDATA%\OpenAI\Codex\bin\247581e40ee272fb\codex-code-mode-host.exe
    

    Local tool execution then worked normally again.

    All four binaries in 247581e40ee272fb:

    • match the SHA-256 hashes of the corresponding files in the current OpenAI.Codex_26.915.4065.0 MSIX resources;
    • have valid Authenticode signatures from OpenAI OpCo, LLC.

    Interpretation

    The evidence appears consistent with a runtime lifecycle/version-skew problem:

    1. the updater deploys a new hash-named runtime;
    2. the previous runtime is removed;
    3. an existing app-server/task remains alive or retains the resolved absolute path of the previous runtime;
    4. later tool calls try to spawn codex-code-mode-host.exe from the deleted runtime and fail with os 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:

    • restart any app-server that is bound to the previous runtime;
    • retain the previous runtime until all processes using it have exited;
    • dynamically resolve the current managed runtime before spawning helpers;
    • or detect the missing helper and automatically re-materialize/rebind the runtime.

    The app should not leave an apparently active task permanently bound to an executable path that the updater has removed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    appbugtool-callswindows-os

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions