Skip to content

[Windows][26.825.6671.0] Headless startup persists after clean runtime reset; cua_node staging never finalizes #41850

Open

Description

@Kilimanjaror-06

Environment

  • Codex Desktop / Microsoft Store package: OpenAI.Codex 26.825.6671.0
  • Platform: Windows x64
  • Package install location: C:\Program Files\WindowsApps\OpenAI.Codex_26.825.6671.0_x64__2p2nqsd0c76g0
  • Standalone Codex CLI available and working: codex-cli 0.142.5

What issue are you seeing?

Codex Desktop launches several ChatGPT.exe background processes but never shows a window.

Observed process state on every launch:

  • main ChatGPT.exe: present
  • crashpad handler: present
  • GPU process: present
  • network service: present
  • storage service: present
  • ChatGPT.exe --type=renderer: missing
  • codex.exe ... app-server: missing
  • main process MainWindowHandle = 0

The desktop log stops at:

Launching app
Appshot hotkey inactive

I also enumerated top-level windows for the main process and found a Chrome_WidgetWin_0 with Visible=False. A synchronous ShowWindow attempt did not restore the UI and caused the PowerShell caller to block, so this is not simply a hidden-window issue.

Runtime staging behavior

The failure is reproducible in a completely fresh local runtime directory.

After moving the old %LOCALAPPDATA%\OpenAI\Codex aside and launching the freshly reinstalled app, Codex immediately recreated:

%LOCALAPPDATA%\OpenAI\Codex\runtimes\cua_node\.staging-415ffebf3d576e9b-<random>

but never produced the finalized runtime directory:

%LOCALAPPDATA%\OpenAI\Codex\runtimes\cua_node\415ffebf3d576e9b

Before the clean reset, repeated launches created many different .staging-415ffebf3d576e9b-* directories. In those staging directories, bin\node.exe was present but bin\node_repl.exe was missing.

The packaged source file does exist:

C:\Program Files\WindowsApps\OpenAI.Codex_26.825.6671.0_x64__2p2nqsd0c76g0\app\resources\cua_node\bin\node_repl.exe

Workarounds already attempted

  1. Ended all ChatGPT/Codex processes and relaunched.
  2. Restarted Windows.
  3. Repaired/reset the app.
  4. Uninstalled and reinstalled the Microsoft Store package.
  5. Verified standalone CLI works:
codex.cmd --version
codex-cli 0.142.5
  1. Located the native CLI executable and set CODEX_CLI_PATH to that actual codex.exe (not the npm .cmd shim). This did not change the startup behavior.
  2. Moved %LOCALAPPDATA%\OpenAI\Codex aside so the app regenerated an entirely fresh runtime/cache. The same .staging-415ffebf3d576e9b-* failure immediately reproduced.
  3. Following the workaround described in [Windows][26.825.5331.0] Headless startup caused by Application Protected node_repl.exe relocation failure (0x80071770) #41540, copied the missing packaged node_repl.exe into the active staging directory using xcopy /G. The file copied successfully, but on 26.825.6671.0 the app still did not launch a renderer or app-server and no window appeared.

Reproduction steps

  1. Install OpenAI.Codex 26.825.6671.0 from Microsoft Store on Windows x64.
  2. Launch Codex Desktop.
  3. Observe several ChatGPT.exe background processes but no visible window.
  4. Verify there is no --type=renderer process and no codex.exe app-server process.
  5. Inspect %LOCALAPPDATA%\OpenAI\Codex\runtimes\cua_node.
  6. Observe a new .staging-415ffebf3d576e9b-* directory, but no finalized 415ffebf3d576e9b runtime directory.
  7. Kill all processes and launch again; another staging directory may be created and the app remains headless.

Expected behavior

Codex Desktop should complete CUA runtime materialization, launch codex.exe app-server, create the renderer process, and show the application window.

If runtime materialization fails, the app should surface a visible actionable error rather than staying indefinitely headless with only background processes.

Additional information

This appears closely related to:

The notable difference from #41540 is that manually supplying node_repl.exe to the active staging directory did not unblock startup on 26.825.6671.0.

I preserved the failing installation state and can provide additional sanitized process/runtime diagnostics if maintainers specify what would be useful.

Activity

  1. added
    bug
    app
    windows-os
    on Aug 31, 2026
  2. zemeng5208 commented on Aug 31, 2026

    @zemeng5208

    I maintain WinBridge Recovery for Windows Codex Desktop local-state recovery: https://github.com/zemeng5208/winbridge-recovery

    This one is a fairly direct match for the CUA runtime relocation/materialization layer that WinBridge checks. The repeated %LOCALAPPDATA%\OpenAI\Codex\runtimes\cua_node\.staging-415ffebf3d576e9b-* directories, no finalized 415ffebf3d576e9b runtime, and earlier staging copies where node.exe existed but node_repl.exe did not are all useful local-state signals.

    For this case, WinBridge can help distinguish whether 26.825.6671.0 has left a genuinely partial CUA runtime versus a runtime that is complete enough on disk but never gets finalized/selected. It checks the expected runtime identity/version, the staging and final directories, required helper files (including node.exe / node_repl.exe and related CUA helpers), stale staging remnants, and whether the active paths still resolve to the current packaged/runtime state. Where the source is Application Protected/EFS, it can also identify that separately from an ordinary lock/path/ACL failure instead of treating all failed materialization as the same error.

    The result in step 8 is important, though: because supplying the missing node_repl.exe with xcopy /G did not make 26.825.6671.0 finalize the runtime or spawn the renderer/app-server, I would not assume this is only the single-file EFS case from #41540. There may be another missing/partial runtime component or a 26.825.6671.0 upstream bootstrap/materializer regression after the local files are already healthy.

    WinBridge only repairs/validates user-owned local state; it does not modify WindowsApps, bypass package protection, or patch the Desktop runtime. So if a verified complete 415ffebf3d576e9b runtime still leaves the app headless and the current build refuses to finalize/select it, that part needs an upstream Codex fix rather than a guaranteed local repair.

  3. Edwardxlai commented on Sep 2, 2026

    @Edwardxlai

    Still reproducing on 26.831.1445.0, and I have a data point that I think pins down the exact API-level fix.

    Environment

    • OpenAI.Codex 26.831.1445.0 (Microsoft Store / MSIX)
    • Windows 11 Home, build 10.0.26200
    • Install location: C:\Program Files\WindowsApps\OpenAI.Codex_26.831.1445.0_x64__2p2nqsd0c76g0

    Same symptom as described here: several ChatGPT.exe processes, MainWindowHandle = 0, and the desktop log stops dead at:

    [sparkle] in_app_updates_policy_wait_started timeoutMs=300000
    Launching app ...
    Appshot hotkey inactive configured=true enabled=false platform=win32
    

    The staging hash rotates on every Store update, so the fix does not stick

    This is the part that makes it feel like a regression rather than a one-time breakage. The target directory name under runtimes\cua_node\ is version-specific:

    App version Expected runtime dir
    26.825.4187.0 e4d75eceaa042f20
    26.831.1445.0 799aa322aa55dbc2

    I manually materialised e4d75eceaa042f20 and the app started normally. It then auto-updated overnight to 26.831.1445.0, which wants 799aa322aa55dbc2, the copy failed again, and the app went headless again — leaving two fresh .staging-799aa322aa55dbc2-* directories behind.

    Across the whole episode the abandoned staging directories accumulated to 1.87 GB (13 directories, ~150–240 MB each) before I cleared them. Nothing prunes them, so every failed launch adds another partial copy.

    Confirming the EFS cause and what actually fixes it

    #32732 already identified the EFS angle; this narrows it to the specific call.

    Reading the source file works fine — my account can decrypt it:

    [IO.File]::ReadAllBytes("$src\bin\corepack").Length
    # 334

    Copy-Item on the same file fails:

    Copy-Item : The specified file could not be encrypted.
    

    That is ERROR_ENCRYPTION_FAILED (6000 / 0x80071770) — the same code in the title of #41540. It surfaces through libuv as errno -4094 UNKNOWN, which is what the app logs as bundled_executable_relocation_failed.

    robocopy cannot even enumerate the tree (Files : 0). 5620 of the files under app\resources carry FILE_ATTRIBUTE_ENCRYPTED. This is normal for Store payloads — Raycast's MSIX package on the same machine is likewise fully marked.

    The failure is on the destination side, not the read side. A plain stream copy that never asks Windows to preserve the encrypted attribute succeeds on 100% of the files:

    $in  = [IO.File]::OpenRead($srcFile)
    $out = [IO.File]::Create($dstFile)
    $in.CopyTo($out)
    # copied=4684  failed=0  322.0 MB

    Same source, same destination, same account — 4684/4684 files, zero failures. The only difference is not going through CopyFileExW's encryption-preserving path.

    So the fix looks like passing COPY_FILE_ALLOW_DECRYPTED_DESTINATION (0x00000008) to CopyFileExW in the relocation code, or dropping to a stream copy on Windows. Node's fs.copyFile does not expose that flag, which is likely why the bundled-executable relocation path hits this at all.

    Suggestions beyond the copy flag

    1. Do not block window creation on runtime relocation. The window never appears at all, which gives users no way to understand or report the problem. Staging the CUA runtime lazily, or showing the window first and surfacing a banner on failure, would turn a hard hang into a degraded-but-usable app.
    2. Prune .staging-* directories on startup. 1.87 GB of abandoned partial copies accumulated silently.
    3. Fail fast. On 26.820 the relocation failed in ~300 ms and the app fell back to a CLI on PATH and worked. The newer builds appear to retry/copy slowly instead, which is what converts the failure into an indefinite hang.

    Happy to run any diagnostic on this machine — it reproduces on every Store update.

  4. computersniper commented on Sep 4, 2026

    @computersniper

    Still reproducing on 26.901.1978.0, with another version-specific runtime hash and a measured recovery timeline.

    Environment

    • OpenAI.Codex 26.901.1978.0 (Microsoft Store / MSIX, package status Ok)
    • Windows 11 Home x64, build 26200
    • Current cua_node runtime ID: ad3b5049246cde44

    Headless startup state

    At 2026-09-04 14:56:33 local time, the packaged app started but remained headless:

    • main ChatGPT.exe, crashpad, GPU, network, and storage processes were present and responsive;
    • all processes had MainWindowHandle = 0;
    • no --type=renderer process was present;
    • no desktop child codex.exe app-server was present;
    • the main process accumulated about 862 CPU seconds while no window was visible.

    The new runtime was not finalized. Under %LOCALAPPDATA%\OpenAI\Codex\runtimes\cua_node, I observed:

    • .staging-ad3b5049246cde44-hzkgF7: 4,419 files / 266.3 MB, no manifest.json;
    • another staging attempt: 149 files / 152.6 MB, no manifest.json;
    • the previously completed 799aa322aa55dbc2 runtime from 26.831.1445.0 was present but correctly not reused.

    The packaged source for this build contains 4,684 files / 322.0 MB, including manifest.json, bin\node.exe, and bin\node_repl.exe.

    How it recovered this time

    I left the same process tree running instead of killing/restarting it. At approximately 15:13:18, the app finally promoted/finalized:

    %LOCALAPPDATA%\OpenAI\Codex\runtimes\cua_node\ad3b5049246cde44

    Validation after finalization:

    • files: 4,684
    • size: 322.0 MB
    • manifest.json: present
    • bin\node.exe: present
    • bin\node_repl.exe: present

    The existing main process then gained a nonzero window handle and title ChatGPT; renderer processes appeared immediately afterward. Total silent headless time was roughly 16 minutes 45 seconds.

    No app reset, uninstall/reinstall, cache deletion, credential change, WindowsApps permission change, or manual runtime copy was performed in this 26.901.1978.0 recovery.

    For comparison, on the same machine with 26.831.1445.0, repeated staging did not finalize; buffered stream-copying all 4,684 official packaged runtime files into the version-specific final directory, validating count/bytes/key files, and then atomically promoting the directory restored normal startup. That remains consistent with the Application Protected/EFS relocation analysis above.

    Upstream implications

    This confirms the bug survives another Store update and rotates to a new runtime hash. Depending on timing/error handling, the protected-file fallback may be either extremely slow or leave abandoned partial staging trees.

    Suggested fixes remain:

    1. use COPY_FILE_ALLOW_DECRYPTED_DESTINATION or a reliable streaming fallback for the full runtime tree on Windows;
    2. create/show a progress or recovery window before blocking on runtime materialization;
    3. resume or validate an existing staging tree instead of starting over after every interrupted launch;
    4. prune abandoned .staging-* directories after a verified final runtime exists;
    5. log the exact relative file and Win32/HRESULT when relocation falls back or fails.

    No account identifiers, credentials, conversation content, or private project paths are included.

  5. qingchuan-x commented on Nov 17, 2026

    @qingchuan-x

    Still reproducing on 26.1111.2228.0 (2026-11-17)

    Adding a fresh Windows data point — same family as #28673 / #28258 / #41822:

    • Environment: OpenAI.Codex 26.1111.2228.0 (MSIX) + OpenAI.CodexPrimaryRuntime.v26-1112-737.0, codex-cli 0.167.0-alpha.4.1, Windows 11 x64 (build 26100), ASCII user profile.
    • AppData\Local\OpenAI\Codex\runtimes\cua_node accumulated 330 orphaned .staging-bfa21d187eb00b05-* directories (~46.4 GB) in roughly one day while the app was running (~1.7 GB/h), taking the C: drive (200 GB) to 0 bytes free.
    • A finalized runtime (bbc9141fe9f920ac, complete) was present the whole time; staging for bfa21d187eb00b05 never finalized — consistent with the EFS/Application-Protected relocation failure (0x80071770) analysis above.
    • Deleting the .staging-* directories freed 46.4 GB instantly; within a day, the app (now on 26.1111.2228.0) started staging a new hash (c38161ad8494f88c) under Codex\bin — so the pattern survives updates and is not limited to runtimes\cua_node.

    Happy to capture logs/diagnostics if maintainers want specific output.

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

    appbugcomputer-usewindows-os

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions