Repository navigation
[Windows 26.820] Codex Desktop cannot start: bundled codex.exe relocation from WindowsApps fails #40700
Description
What version of the Codex App are you using (From “About Codex” dialog)?
26.820.7780.0 (from Get-AppxPackage; the app cannot start to open the About Codex dialog)
What subscription do you have?
ChatGPT Plus
What platform is your computer?
Microsoft Windows NT 10.0.26200.0 x64
What issue are you seeing?
After updating Codex Desktop to version 26.820.7780.0, the app can no longer start.
The startup dialog reports:
Unable to locate the Codex CLI binary.
Set CODEX_CLI_PATH or ensure the Electron resources include bin/codex.
However, the bundled Windows CLI is present at:
C:\Program Files\WindowsApps\OpenAI.Codex_26.820.7780.0_x64__2p2nqsd0c76g0\app\resources\codex.exe
The startup logs show that the actual failure occurs earlier, while Codex attempts to relocate the bundled Windows executable from the WindowsApps package into the per-user runtime directory.
Relevant log fields:
bundled_executable_relocation_failed
operation=copy_file
executableName=codex.exe
failedExecutableName=codex.exe
sourceKind=windowsapps
sourcePath:
C:\Program Files\WindowsApps\OpenAI.Codex_26.820.7780.0_x64__2p2nqsd0c76g0\app\resources\codex.exe
destinationPath:
C:\Users<user>\AppData\Local\OpenAI\Codex\bin.staging-...\codex.exe
originalError:
errno=-4094
code=UNKNOWN
syscall=copyfile
Immediately afterwards, AppServerConnection fails with:
Unable to locate the Codex CLI binary.
The bundled files:
app\resources\codex.exe
app\resources\codex
both report the Windows file attributes:
Archive, Encrypted
A manual copy test of the bundled codex file from WindowsApps to a normal temporary directory also fails with:
The specified file could not be encrypted.
During the same startup sequence, Codex also fails to relocate the bundled cua_node runtime using copy_directory.
The app worked before the update and stopped starting immediately after updating to 26.820.7780.0.
What steps can reproduce the bug?
-
Update/install Codex Desktop from the Microsoft Store to version 26.820.7780.0 on this Windows x64 machine.
-
Launch Codex Desktop.
-
The app attempts to relocate the bundled codex.exe from the WindowsApps package into:
%LOCALAPPDATA%\OpenAI\Codex\bin\ -
The relocation fails during copy_file.
-
Codex then displays:
"Unable to locate the Codex CLI binary."
Potentially relevant AppX environment details:
Get-AppxDefaultVolume reports:
D:\WindowsApps
Get-AppxPackage OpenAI.Codex reports:
Version:
26.820.7780.0
InstallLocation:
C:\Program Files\WindowsApps\OpenAI.Codex_26.820.7780.0_x64__2p2nqsd0c76g0
A directory for the same Codex package/version is visible under both:
C:\Program Files\WindowsApps
D:\WindowsApps\
I have not modified WindowsApps permissions, ownership, ACLs, package files, encryption settings, Codex configuration, or CODEX_CLI_PATH.
What is the expected behavior?
Codex Desktop should successfully locate or relocate the bundled Windows Codex CLI and start normally.
If WindowsApps / Application Protected / encrypted package resources cannot be copied to the per-user runtime directory using the current copy mechanism, Codex should use a Windows-compatible relocation method and surface the underlying Windows error instead of reporting that the CLI is missing.
Additional information
This appears related to existing Windows bundled-runtime relocation issues, but the impact in this case is more severe: the Windows-native codex.exe relocation failure prevents the entire Codex Desktop app from starting.
Potentially related issues:
#25571 - WindowsApps package on a non-system AppX volume / protected bundled executable relocation failures
#38696 - encrypted bundled Codex relocation failure in the WSL path
#34764 - Application Protected cua_node relocation failure
The same startup sequence on this machine shows both codex.exe copy_file relocation failures and cua_node copy_directory relocation failures.
The "Check for Updates" button in the startup error dialog still works and currently reports:
ChatGPT is up to date.
No workaround or local modification has been applied after reproducing the issue, so the failing installation state is currently preserved.
Activity
ahku667 commentedon Aug 25, 2026
I can independently reproduce this on the exact same Windows package:
Important: my Desktop configuration is Windows-native:
The bundled binaries are present:
Both report:
A direct copy reproduction of the packaged Linux
codexbinary to%TEMP%fails with:The Desktop startup log shows the same Windows-native relocation failure:
Immediately afterwards:
The same startup sequence also contains relocation failures for the bundled
cua_node/ Node runtime usingcopy_directory.Windows Settings > Apps > ChatGPT > Repair did not resolve the issue.
I did not modify WindowsApps ownership, ACLs, package files, encryption,
CODEX_CLI_PATH, the bundled binaries, or Codex runtime state before reproducing this.Additional AppX-volume evidence from a final read-only audit:
An exact package directory for the same package full name also exists at:
The C: and F: copies of both bundled binaries are byte-identical by size and SHA-256:
The hashes are identical on C: and F:.
So this machine has a multi-AppX-volume mismatch/state in which the default AppX volume is F:, the registered Codex package install location is C:, and an identical copy of the same package/version is also present under F:\WindowsApps.
I cannot prove that this multi-volume state is the root cause rather than only a trigger/amplifier, but it closely matches the potentially relevant environment shape already described in #40700.
This appears to confirm that #40700 affects the Windows-native path itself, not only the WSL agent path, and that the underlying failure is consistent with
ERROR_ENCRYPTION_FAILED (0x80071770)/ protected MSIX resource relocation.hz3204323 commentedon Aug 25, 2026
I can reproduce this exact regression on Windows x64.
Working:
26.818.8289.0Broken:
26.820.7780.0Additional evidence from my machine:
app\resources\codex.exeandapp\resources\codexboth exist in the26.820.7780.0package.Archive, Encrypted/ Application Protected behavior.bundled_executable_relocation_failedexecutableName=codex.exeplatform=win32operation=copy_file...\WindowsApps\OpenAI.Codex_26.820.7780.0...\app\resources\codex.exe%LOCALAPPDATA%\OpenAI\Codex\bin\.staging-...\codex.exeerrno=-4094,code=UNKNOWNUnable to locate the Codex CLI binary.Copy-Itemof the bundledcodexfile from WindowsApps to%TEMP%fails with:The specified file could not be encrypted.This is the Windows-native CLI path in my failing log, not the WSL bootstrap path.
CODEX_CLI_PATHis unset, and therunCodexInWindowsSubsystemForLinuxsetting is not present in my config.My
%USERPROFILE%\.codexis a Junction toD:\ChatGPT\CodexHome, but that same Junction/D-drive layout was present while26.818.8289.0worked normally, so it does not explain the version-specific regression.I also compared the two desktop builds:
26.818.8289.0can directly resolve/run the bundledresources\codex.exe, while26.820.7780.0routes startup through the relocation helper first. The old build also logged some bundled-runtime/plugin copy warnings, but they were non-fatal; the new build appears to make successful nativecodex.exerelocation a prerequisite for startup.I downloaded the official previous release MSIX from OpenAI's CDN and downgraded with:
After returning to
26.818.8289.0, the desktop app started immediately and my existing projects, sessions, and configuration were still intact.This looks like a regression in the new mandatory Windows-native CLI relocation path when the source resource is Store/MSIX Application Protected.
xianlitijun commentedon Aug 25, 2026
Independent reproduction of this release regression on Windows 11:
ChatGPT/Codex Desktop was working normally before today's (2026-08-25) Windows app update.
Immediately after updating to the latest release, the app fails on first launch with the same fatal dialog:
ChatGPT failed to start.Unable to locate the Codex CLI binary. Set CODEX_CLI_PATH or ensure the Electron resources include bin/codex.This machine had not encountered the issue on prior builds; the failure began only after today's update.
The main app is now completely inaccessible, so this is a blocking startup regression rather than a feature-level failure.
The startup dialog still exposes
Check for Updates, but the current release is already the latest.This appears consistent with #40700 and adds another update-triggered reproduction. A screenshot of the exact dialog is available if maintainers need it.
zemeng5208 commentedon Aug 25, 2026
I maintain WinBridge Recovery: https://github.com/zemeng5208/winbridge-recovery
This report is a high-confidence match for one of the local Windows layers WinBridge is designed to diagnose: bundled executable/runtime relocation from the installed MSIX/WindowsApps package into the per-user Codex runtime, including Application Protected/EFS copy failures and incomplete staging.
For this specific failure, the useful local checks are:
app\resources\codex.exe/codexandcua_nodesources exist and are readable;%LOCALAPPDATA%\OpenAI\Codex\binandruntimes\cua_nodefor abandoned.staging-*directories or an incomplete active runtime;ERROR_ENCRYPTION_FAILEDcopy path shown here.WinBridge can help collect that evidence and recover user-side staging/runtime state where a valid current-package copy can be materialized safely. It does not modify
WindowsApps, bypass package protection, or guarantee a fix. In particular, if Desktop26.820.7780.0now requirescodex.exeto be copied with a mechanism that does not allow an Application Protected source to an unencrypted destination, then the durable fix is upstream in Codex's Windows relocation implementation (for example, using a decrypted-destination-compatible copy path and reusing a verified existing runtime when appropriate).whywhybe commentedon Aug 26, 2026
Same issue!!!
Run the following command in Windows Powershell and i get the correct respond:
But run
where.exe codexi can't find anything.eksynn commentedon Aug 26, 2026
I can reproduce this exactly on Windows x64 with
OpenAI.Codex 26.820.7780.0.The app worked normally before the update. Immediately after updating to
26.820.7780.0, startup failed with:Unable to locate the Codex CLI binary.My AppX configuration is:
while the affected package was registered at:
I rolled back to the official
26.818.8289.0MSIX using:and ChatGPT immediately launches normally again.
Please also make the updater preserve the user's configured/existing AppX installation volume. My Windows default app volume is explicitly
B:\WindowsApps; the ChatGPT package should not silently fall back to or migrate onto C: during installation or updates.If relocation of bundled runtime files is necessary, it should work correctly with a non-system AppX volume rather than requiring the application itself to live on C:.
pwnfan commentedon Aug 26, 2026
I reproduced the same
26.820.7780.0startup regression on another Windows x64 machine and recovered the app without rolling back, changing WindowsApps permissions or ownership, or settingCODEX_CLI_PATH.✅ Start here: verified no-rollback recovery
Comment permalink (copy this URL):
Fastest option when the desktop app cannot start: give the permalink above to a Codex agent that still runs and can access the Windows host filesystem, for example:
You can send the agent this prompt:
The agent can adapt the paths to the actual installation and let the user review the commands before execution. Do not put account credentials, tokens, or other secrets in the GitHub comment or prompt.
If you prefer to perform the recovery manually, go directly to Manual recovery (PowerShell) below. The script dynamically computes the five version-directory IDs from the currently installed package. It has been validated on
26.820.7780.0x64 and stops before writing if the known bundle layout is not present.Root cause confirmation
The first failure is not the WSL environment failing to find a user-installed Codex CLI. The desktop app cannot copy resources carrying the
Encrypted/ Application Protected attribute from the MSIX package into its per-user cache:Only afterward does it emit the misleading secondary errors:
The same launch also fails while copying the
cua_nodedirectory andrg.exe. Therefore, restoring only the WSLcodexfile, settingCODEX_CLI_PATH, or reinstalling the same MSIX package is insufficient for this Windows-native bootstrap regression.Version-directory rule used by the app
The app does not use a fixed
bin/codexpath. It derives a 16-character directory name from a resource descriptor. In the app-defined file order, each entry contributes:The app hashes the complete descriptor with SHA-256 and uses its first 16 characters.
For the official
26.820.7780.0x64 package, the resulting IDs are:The Windows CLI descriptor contains, in order:
The
cua_nodedescriptor contains:The WSL CLI descriptor contains:
Manual recovery (PowerShell)
The PowerShell script below selects the currently installed official OpenAI.Codex x64 package and dynamically computes all five version-directory IDs from its resource bytes. The same script can therefore be rerun after a future update when the bundle file lists, ordering, hashing algorithm, and cache layout remain unchanged. If a known bundle file is absent, it stops before writing. It reads package resources with
FileStreamand creates ordinary destination files so the destination does not inherit the source's Application Protected/EFS state. It writes into a random staging directory, verifies file size and SHA-256, and then renames the staging directory atomically.Safety boundaries:
CODEX_CLI_PATH.cua_nodefiles may take several minutes.PowerShell recovery script (dynamic bundle IDs; known x64 package layout)
Validation from the recovered machine
Before recovery, the launch probe consistently reported:
After materializing the five version directories from the currently installed official package:
The key bundle files matched the package sources by size and SHA-256. After relaunch:
The new launch logs no longer contained:
The desktop UI was also confirmed to launch normally.
Suggested upstream fix
Please make WindowsApps resource relocation support an Application Protected/EFS source and an ordinary decrypted per-user destination, for example by:
COPY_FILE_ALLOW_DECRYPTED_DESTINATION; orcopyFilereceivesERROR_ENCRYPTION_FAILED;This remains a bundle-layout-specific temporary recovery. The script now recomputes the directory IDs from the installed package, so it can be rerun unchanged when an update changes only the version and resource bytes. It deliberately stops if the known file lists are no longer present. The durable fix belongs in the app's relocation implementation.
Related: #38696, #34764, #25571.
981434631 commentedon Aug 26, 2026
I can independently reproduce this exact startup regression on another Windows x64 machine.
Environment
26.820.7780.010.0.26200.0x64OkC:\Program Files\WindowsApps\OpenAI.Codex_26.820.7780.0_x64__2p2nqsd0c76g0F:\WindowsAppsThe packaged CLI exists at
app\resources\codex.exe, but launching the desktop app fails with:On this machine:
codex.exehas attributesArchive, Encrypted;%LOCALAPPDATA%\OpenAI\Codex\bin\codex.exehas attributesArchive;09D6723925E724EDF0BBBBC7B9E204526E0FB1462C86BD2A4997311FD5071EBA;codex-cli 0.150.0-alpha.8.Reproduction / workaround confirmation
CODEX_CLI_PATHunset, relaunching immediately reproduces the fatal startup dialog.codex.exe,codex-code-mode-host.exe,codex-windows-sandbox-setup.exe, andcodex-command-runner.exe) into%LOCALAPPDATA%\OpenAI\Codex\bin\succeeds when materialized as ordinary files.%LOCALAPPDATA%\OpenAI\Codex\bin\codex.exeallows Codex Desktop to start, and the runningcodex.exeprocess is the user-directory copy.This strongly supports the existing diagnosis: the bundled executable is present and valid, but the automatic WindowsApps-to-per-user relocation/materialization path fails. The generic “CLI binary missing” dialog is a downstream symptom.
The environment-variable workaround restores the current release, but it bypasses automatic CLI discovery/relocation and can pin the desktop app to this copied CLI after a future update. Please fix the Windows relocation path (including encrypted/Application Protected package resources and cross-AppX-volume states), and surface the underlying copy error in the startup dialog.
xiaodeng2025 commentedon Aug 26, 2026
I can independently reproduce this on Codex App 26.820.7780.0 / Windows 10.0.26200.0 x64.
The bundled codex.exe exists, is marked Encrypted, and executing it directly returns Access is denied.
The issue appeared immediately after updating. My duplicate report was #40762.
Daozhu1007 commentedon Aug 26, 2026
Adding a few data points from my machine (26.820.7780.0, Windows 11 10.0.26200 x64) that may help triage:
1. This relocation step has been flaky since at least Aug 18 — the update just made it fatal.
My desktop logs show
bundled_executable_relocation_failed(sameerrno=-4094/UNKNOWN/copyfile) intermittently on Aug 18, 22, 23, 24 and 25, while the app still started fine — the previously relocated binary in%LOCALAPPDATA%\OpenAI\Codex\binwas still present, so the failed relocation only logged a warning. After updating to 26.820.7780.0 the app no longer accepted the old binary and attempted a fresh relocation, which failed, leaving no binary at all. There seems to be no fallback whenbin\codex.exeis missing.2. CopyFileW hangs on the packaged binaries; a plain read/write stream copy works.
app\resources\codex.exeshows theArchive, Encryptedattributes here too (confirming @xiaodeng2025's observation). One caveat: the successfully-relocated April-era binary also carriesArchive, Encrypted, so the attribute alone doesn't explain why relocation used to succeed. But the CopyFileW behavior is clearly broken: the app'sfs.copyFilefails with-4094, and PowerShellCopy-Itemon an 8 MB packaged exe hangs indefinitely (>90 s, never completes). A stream copy that doesn't go through CopyFileW ([IO.File]::OpenRead+CopyTo, orcpin Git Bash) completes in under a second and produces a hash-identical, working binary with theEncryptedattribute cleared.So a possible app-side fix: when the copyfile relocation fails, fall back to a read/write stream copy — that would make relocation robust regardless of the underlying cause.
3. Verified recovery (no rollback, no permission changes):
After this the app starts normally: zero fatal errors in the desktop log, app_server_connection reaches connected/initialized=true, and the running codex.exe is confirmed to be the manually placed copy.
liangjxiong commentedon Aug 26, 2026
Another exact reproduction on
OpenAI.Codex 26.820.7780.0x64.Environment/audit:
C:\Program Files\WindowsApps\OpenAI.Codex_26.820.7780.0_x64__2p2nqsd0c76g0...Get-AppxPackage *ChatGPT*.CODEX_CLI_PATHis unset at both User and Machine scopes.~/.codex/config.tomlcontains norunCodexInWindowsSubsystemForLinux,integratedTerminalShell,CODEX_CLI_PATH, orsandbox-binoverride.There had previously been a process-local workaround value pointing at
%USERPROFILE%\.codex\.sandbox-bin\codex.exe; removing it clears the environment variable. That workaround could allow the desktop app to get further/start, but then Codex was unable to reliably modify project files/code. The desktop global state still contains the expected project roots underthread-writable-roots, including the affected project directories, so this does not look like a simple missing writable-root grant.This strongly matches #40700 rather than a WSL-only configuration problem. It also suggests that setting
CODEX_CLI_PATHto a manually staged.sandbox-bin\codex.exeis not a safe workaround because it may create a desktop/runtime/sandbox mismatch even if startup succeeds.24 remaining items
bherreraicon commentedon Aug 27, 2026
Confirmed workaround on Windows 11 for the
Unable to locate the Codex CLI binaryregression.Environment:
26.820.10647.026200%LOCALAPPDATA%\OpenAI\Codex\bin\...\codex.execodex-cli 0.150.0-alpha.8Observed behavior:
Unable to locate the Codex CLI binary.%LOCALAPPDATA%\OpenAI\Codex\bincontained many.staging-*directories.codex.exeappeared, but during subsequent startup attempts that directory could be rotated/removed, so pointingCODEX_CLI_PATHdirectly at that managed hash directory was not stable.Workaround that successfully started Codex Desktop:
Then fully close ChatGPT/Codex processes and reopen Codex normally from Start.
This worked for me. Copying the executable outside
%LOCALAPPDATA%\OpenAI\Codex\binwas important because the hash directory inside that tree was modified/removed by subsequent startup/update attempts. This is only a temporary workaround until the relocation/updater issue is fixed; the copied CLI can become stale after future updates.ZzXxYy1234 commentedon Aug 28, 2026
Also reproduces on the two builds after the one reported here, with new root-cause detail and a reliable workaround.
Versions: 26.820.9563.0 and 26.825.3734.0 (Store auto-update), Windows 11 10.0.26200 x64
Symptom variant (headless window): processes spawn but no window is ever created; the main process busy-spins (58+ CPU-seconds) for ~8 minutes; the desktop log stops right after
Appshot hotkey inactive. During this state the app repeatedly creates.staging-<hash>-*directories under%LOCALAPPDATA%\OpenAI\Codex\runtimes\cua_node\that stall at ~3600/4680 files, get cleaned up, and are recreated — matchingbundled_executable_relocation_failed ... errno=-4094 code=UNKNOWN syscall=copyfilein the log. On 26.820.9563.0 the loop eventually succeeded and the window appeared (startupElapsedMs≈15600); on 26.825.3734.0 it did not recover on its own within 40+ minutes.Two independent failure modes in the relocation step:
C:\Program Files\WindowsApps\OpenAI.Codex_<ver>_x64__2p2nqsd0c76g0\app\resourcescarries the NTFSEncryptedattribute on affected machines ((Get-Item ...).Attributes→Archive, Encrypted). On accounts where EFS cannot initialize (cipher /k→ "The request is not supported"), CopyFileW-based copies fail withERROR_ENCRYPTION_FAILED("cannot encrypt the specified file") because CopyFileW preserves the Encrypted attribute on the destination. robocopy fails the same way; plain read→write copies of the same files succeed.resources\cua_nodecontains pnpm-store directory trees deeper than 260 characters; withLongPathsEnabled=0evenGet-ChildItem -Recurseerrors on them, so the relocation copy cannot enumerate the full tree.Workaround that reliably unblocks startup (~15 s): pre-create the relocation destination so the app skips its own copy:
<hash>= the hash from the leftover%LOCALAPPDATA%\OpenAI\Codex\runtimes\cua_node\.staging-<hash>-*directory name (e.g.759ccb73c5d75f83for 26.825.3734.0);...\app\resources\cua_node→%LOCALAPPDATA%\OpenAI\Codex\runtimes\cua_node\<hash>\with anything that does not preserve attributes (e.g. Nodefs.readFileSync/fs.writeFileSync— 4680 files / ~319 MB, 0 failures);ChatGPT.exeand relaunch.(For the earlier "Unable to locate the Codex CLI binary" dialog variant on .7780: setting
CODEX_CLI_PATHto a realcodex.exeworked — note that pointing it at the npmcodex.cmdshim fails withspawn EINVAL.)Suggestions:
\\?\-prefixed (long-path-aware) paths in the relocation routine;suizhejiu commentedon Aug 28, 2026
Still reproduces on 26.825.4187.0 (Store auto-update chain) — the bug survives patch updates and recurs after every update.
Environment:
MainWindowHandle = 0; only MAIN/GPU/UTILITY/CRASHPAD child processes, no--type=renderer, nocodex.exebackend)app\resources\codex.exestill reportsArchive, Encrypted/ Application Protected; direct execution from WindowsApps =Access is denied;fs.copyFile-style relocation fails withERROR_ENCRYPTION_FAILED(0x80071770)Key observations for maintainers:
%LOCALAPPDATA%\\OpenAI\\Codex\\bin\\<16-hex-hash>) no longer matches, and the app tries to relocate again and fails. Users who applied the earlier workaround are re-broken on every update.CODEX_CLI_PATHpointing into WindowsApps):FileStream.CopyTo), which bypasses the EFS/Application-Protected copy failure thatCopyFileW/fs.copyFilehits. Destination must be created as an ordinary (unencrypted) file.<UTF-8 file name> NUL <lowercase SHA-256> NULconcatenated, then SHA-256 of the whole descriptor, first 16 hex chars) — this needs to be recomputed per version.CODEX_CLI_PATHto%LOCALAPPDATA%\\OpenAI\\Codex\\bin\\<hash>\\codex.exe. The app honors it (app.asarcontainsCODEX_CLI_PATHhandling).codex.exeruns from the per-user cache.cua_nodedirectory relocation also fails (copy_directory) — node runtime unavailable in the affected path even after the CLI workaround.Please fix the Windows relocation path to handle an Application-Protected/EFS source with an ordinary decrypted destination (e.g.
COPY_FILE_ALLOW_DECRYPTED_DESTINATIONor a buffered read/write fallback onERROR_ENCRYPTION_FAILED), and ideally preserve/validate existing per-user caches across updates so the app does not re-break on every Store update. Happy to provide more logs/hashes if helpful.Jiaoyang45 commentedon Aug 31, 2026
Still reproduces on
26.825.6671.0, but the bundled resources are not markedEncryptedI can reproduce the same startup failure on a newer Store build:
26.825.6671.0x64I ran a read-only diagnostic check before applying any workaround.
Package and AppX volume
The package is physically installed on the system AppX volume:
Therefore, this machine does not have the secondary/non-system AppX volume configuration reported by some other affected users.
Bundled executables exist and are not encrypted
The expected files are present under
app\resources:Unlike the earlier EFS/Application Protected cases in this issue, these resources report only
Archive, notArchive, Encrypted.No CLI override or PATH installation
CODEX_CLI_PATHis empty at both User and Machine scope:There is also no standalone Windows Codex CLI currently available through PATH:
Relocation/cache evidence
%LOCALAPPDATA%\OpenAI\Codex\bincontains a very large number of abandoned.staging-<hash>-*directories from repeated startup attempts.New staging directories were created during the latest attempts on August 31, for example:
Some older non-staging cache directories and executables also exist, but the current Desktop build still reports that it cannot locate the CLI.
The CUA runtime appears to have reached a finalized, non-staging directory:
This suggests that, on this machine, the immediate startup blocker is specifically the CLI relocation/cache finalization path.
Conclusion
This appears to be a new variant of the same bundled-runtime relocation problem:
codex.exeexists;Encrypted;CODEX_CLI_PATHis not misconfigured;.staging-*directories and fails to produce or select a usable current CLI cache.This suggests the issue may be broader than EFS encryption or installation on a secondary AppX volume. There may also be a failure in staging-directory promotion, cache validation, file locking, or another part of the relocation path.
I have not modified WindowsApps permissions, reset the app, deleted the runtime caches, installed a standalone Windows CLI, or set
CODEX_CLI_PATH, so the failing state is currently preserved.I can provide the relevant Desktop startup logs or run additional read-only diagnostics if that would help identify the exact failed operation and Windows error code.
@etraut-openai
eksynn commentedon Aug 31, 2026
Hey, this appears fixed for me in
26.825.6671.0xDThe Microsoft Store auto-updated the desktop app while I wasn't looking, and it is now starting and working normally on my machine. I had previously rolled back to
26.818.8289.0because26.820.7780.0failed at startup.This is one machine's result rather than confirmation that it is fixed for everyone, especially since another report here still reproduces it on the same build.
yashuamao commentedon Sep 1, 2026
Independent recurrence on a Windows Microsoft Store/MSIX installation, confirming that the failure persists across later 26.825 updates.
Version/update history
26.820family: first fatal startup failure26.825.4187: failure recurred after Store update26.825.5331: failure recurred after Store updateOpenAI.Codex 26.825.6671.0x64The original fatal dialog was:
A version-specific
CODEX_CLI_PATHworkaround restored startup, but each Store update replaced the versioned package directory, making the previous absolute path stale and causing the failure to recur.Read-only findings on 26.825.6671.0
app\resources\codex.exeexists (313,790,256bytes).app\resources\bin\codexandapp\resources\bin\codex.exedo not exist.CODEX_CLI_PATHpointing to the current package'sapp\resources\codex.exe; User and Machine scope values are unset.This shows that the Windows packaged-resource
copyfilepath is still failing in26.825.6671.0, now visibly affecting bundled-plugin materialization as well as the earlier CLI/runtime relocation path.CODEX_HOMEis on a separate NTFS volume in this reproduction; all usernames and absolute user paths are intentionally omitted.Requested fix
Please make bundled-resource relocation compatible with Application Protected/encrypted MSIX sources (for example, a buffered read/write fallback instead of relying only on
copyfile), use a stable per-user runtime resolution path, and avoid requiring aCODEX_CLI_PATHvalue that embeds the Store package version. The downstream “CLI binary missing” dialog should also surface the underlying relocation/copy error.No WindowsApps ownership, ACL, or package-file modifications were used for these findings.
xiaodeng2025 commentedon Sep 1, 2026
不是修复了吗 为啥还没关闭
bevis7781 commentedon Sep 1, 2026
Update from the original reporter:
26.825.6671.0now starts and works normally on my previously affected machine.My history/projects are intact, a new local task works normally, and the app also starts successfully after a full quit and relaunch. I did not use
CODEX_CLI_PATH, manual runtime materialization, or WindowsApps ACL changes.For reference, this same machine previously failed on
26.820.7780.0and later26.825.4187.0, so this is a meaningful improvement for my environment.I’m leaving the issue open for now because other users are still reporting the same or related bootstrap/materialization failures on
26.825.6671.0. So this appears fixed for at least some previously affected systems, but not yet universally resolved.pieyixi commentedon Sep 2, 2026
Update from the same affected Windows machine:
I tested Codex Desktop 26.831.1445.0 after removing my
CODEX_CLI_PATHworkaround.The good news is that the original startup blocker appears to be fixed on this machine. Codex Desktop now successfully materializes and launches the official runtime from:
The app-server reports:
So the previous failure where the bundled Codex runtime could not be relocated out of
WindowsAppsno longer prevents Desktop from starting.However, the underlying Application Protected file-copy problem does not appear to be fully resolved. It now reproduces while Codex Desktop is copying the bundled plugin marketplace.
The log repeatedly reports:
For example, it attempts to copy:
to:
The stack trace goes through Node's
copyFile/fs.cp.I checked the source file with
cipher /c, and Windows reports:The failed marketplace copies also leave staging directories behind. There are currently 32
openai-bundled.staging-*directories under:They contain various partially copied plugins such as
browser,chrome,computer-use,latex,sites, andvisualize.Startup is now successful but relatively slow. In this launch, the log reported approximately:
Current result:
26.831.1445.0 fixes the original runtime-relocation startup blocker on this machine, but Application Protected files can still fail when copied from WindowsApps through the bundled-plugin marketplace path.
This looks like the same underlying protected-file copy compatibility issue occurring in another copy path.
sakimarquis commentedon Sep 6, 2026
my computer still cannot open codex
Daozhu1007 commentedon Sep 7, 2026
PSA for anyone using the manual-copy workaround from this thread: the copy goes stale silently.
After the 26.901.6511 update, our Aug-26 copy (
0.150.0-alpha.8) kept serving for days, and the server-side model gate (GPT-6 Astra needsclient_version≥ 0.153.0) made the new model invisible in the desktop picker — even though the installed package bundles 0.153.4. Restarting doesn't help; you must refresh the copy in%LOCALAPPDATA%\OpenAI\Codex\bin\.Details and verified fix in #42853.
DDXG commentedon Sep 10, 2026
Additional reproduction: non-ASCII Windows profile and CODEX_HOME workaround
I would like to add a Windows reproduction involving a non-ASCII user profile path.
Environment
Background
Because Codex Desktop has path compatibility problems when the Windows user profile contains Chinese/non-ASCII characters, I intentionally keep the Codex state directory on an ASCII-only path:
This is a deliberate long-term compatibility workaround, not an arbitrary data relocation. I need to keep CODEX_HOME outside the Windows profile to avoid reintroducing the non-ASCII path problem.
The Chromium/Web user-data directory remains under the normal Windows profile:
This directory serves a different purpose from CODEX_HOME.
Timeline
My own incident involved two different startup failure modes at different stages.
1. First immediate startup failure: 2026-08-26
After a Desktop update, the application immediately failed to start with:
The affected Desktop version was recorded as:
The package contained:
However, executing the bundled executable directly from WindowsApps failed with Access Denied. A normal copy operation from the WindowsApps package also failed with an encryption/file-attribute error.
I copied the executable contents to an external ASCII-only directory without preserving the WindowsApps/MSIX file attributes. The copied executable ran successfully and reported:
I then configured:
This restored Desktop startup.
2. Later multi-minute startup delay
After a later Desktop update, the application could start, but ChatGPT.exe and multiple child processes appeared immediately while the foreground window took several minutes to appear.
During this period, one process continuously consumed CPU, memory and disk resources. The application was not completely idle and appeared to be performing initialization, probing or retrying some operation.
3. Second immediate startup failure during troubleshooting: 2026-09-10
While troubleshooting the multi-minute startup delay, CODEX_CLI_PATH was modified/removed.
CODEX_HOME remained:
However, the User-level CODEX_CLI_PATH became empty. The application immediately failed again with:
The external executable was independently verified with:
After restoring:
and restarting ChatGPT Desktop, the same Desktop installation started normally again. Startup returned from several minutes to only a few seconds.
Confirmed behavior
Expected behavior
Current workaround
The external CLI must be copied outside WindowsApps without preserving the protected MSIX file attributes. This workaround restores startup, but it is fragile because the copied CLI may become stale after a Desktop update.
Please investigate the interaction between WindowsApps protected-file relocation, non-ASCII Windows profile paths, CODEX_HOME, CODEX_CLI_PATH, CLI version selection and the startup retry/fallback logic.
vietnd69 commentedon Sep 10, 2026
Confirming that this issue still reproduces on a newer Codex Desktop release.
Environment
26.903.8094.0codex-cli 0.153.4D:)Current reproduction
After updating Codex, the current staging directory under
%LOCALAPPDATA%\OpenAI\Codex\bin\<hash>contained onlyrg.exe. These packaged executables existed underapp\resourcesbut were not relocated:codex.execodex-code-mode-host.execodex-command-runner.execodex-windows-sandbox-setup.exeWindows App Repair and a full restart did not rebuild the staged runtime.
A
CODEX_CLI_PATHworkaround from the previous affected release was still pointing tocodex-cli 0.150.0-alpha.8. Consequently, Desktop used the stale CLI with the newer app and sandboxed commands failed before execution:The helper was present inside the new MSIX package, but absent from the active staged directory and not discoverable through
PATH.Workaround and validation
I used raw buffered stream copies, rather than the normal encrypted-file-preserving copy operation, to relocate the complete
0.153.4executable set to a user-writable directory onD:. SHA-256 hashes were verified against the packaged files.I then updated
CODEX_CLI_PATHandPATHto use that complete, version-matched directory.After restarting Windows:
0.153.4directory.codex-windows-sandbox-setup.exeandcodex-command-runner.exeresolve correctly.This indicates that the packaged binaries are valid and the failure remains in the WindowsApps/Application Protected relocation and staging path. It also shows that partial staging can leave Desktop pinned to an older CLI and cause secondary sandbox-helper failures.
The product fix should ideally:
UNKNOWN/-4094.rg.exe.CODEX_CLI_PATH, or ensure that the matching helper directory is added toPATH.suizhejiu commentedon Sep 13, 2026
Follow-up: the cross-volume AppX layout looks like the underlying mechanism on this class of machine. Moving the package to the system volume eliminated both the relocation failure and the follow-on failures entirely.
(Previously reported here on
26.825.4187.0; reproduced since on26.820.9563.0,26.825.3734.0,26.825.5331.0,26.901.5280.0,26.901.6511.0, and now diagnosed on26.903.9818.0.)Key observation: the package directory was a cross-volume junction
The app's user-data path was also a reparse point, and the desktop log contained
EXDEV: cross-device link not permittedon renames that appear to be inside a single directory.Failure chain observed (one machine, same version)
bundled_executable_relocation_failed— the packagedcodex.exegroup never reached%LOCALAPPDATA%\OpenAI\Codex\bin\<hash>; nocodex.exebackend spawns, so processes run but no window is ever created (same phenotype as Windows app launches background Electron processes but never spawns codex.exe or creates a window #41125).plugin_marketplace_folder_write_failed/bundled_plugins_marketplace_resolve_failed— copyingapp\resources\plugins\openai-bundledout of the package failed on every window focus (copyfile ... UNKNOWN), leaving a partial marketplace (7 of 10 descriptors).codex_app,freecad,blender,memslides,desktop_automation) hittimed out after 30 secondsduring startup.What fixed it
(or Settings → Apps → Installed apps → ChatGPT → Move →
C:)Then: verified
Get-Item $pkg.InstallLocation -Force | Select-Object LinkTypeis empty (no longer a junction), removed theCODEX_CLI_PATHoverride, deleted the manually materialized%LOCALAPPDATA%\OpenAI\Codex\bin\<hash>caches, and launched normally.Before → after (same machine and package version)
bundled_executable_relocation_failedbin\<hash>unaidedCODEX_CLI_PATHworkaroundplugin_marketplace_folder_write_failedEXDEVon renamesBecause the app now stages its own runtime, the "the manual copy goes stale after every Store update" problem described by @Daozhu1007 (hit here across six consecutive updates) no longer applies.
Supporting signals from elsewhere in the tracker
26.903.8094.0and notes the package was stored on a secondary NTFS AppX volume (D:), which is consistent with this.ERROR_NOT_SAME_DEVICE(os error 17) from the archive flow while the standard session root and archive root are on the same volume — a cross-volume package/link layout would explain a move that crosses devices despite same-volume session roots.C:restored startup; this adds the mechanism plus before/after measurements.Scope — what this does and does not claim
plugins\browser\.codex-plugin\plugin.json,plugins\unified-computer-use\.codex-plugin\plugin.json), leaving 7 of 10 bundled plugins (deep-research,sites,user-writingabsent). The decrypted-destination / buffered-copy fallback proposed by @pwnfan and @vietnd69 is still needed.config.tomlcontents and credentials are deliberately excluded.Suggested product fixes
COPY_FILE_ALLOW_DECRYPTED_DESTINATIONor a buffered read/write fallback onERROR_ENCRYPTION_FAILED/-4094, and stage into a temporary location on the same volume as the destination before publishing.rg.exe).Diagnostics for anyone hitting this
If
LinkTypereportsJunctionwith a target outside the system volume, moving the package to the system volume is worth trying before applying caching workarounds.kilia commentedon Oct 15, 2026
Same Problem.
The root cause of this issue is that the runtime files failed to copy during the Codex auto-update, resulting in a mismatch between the old and new hash-based cache paths, which prevented the organization settings from loading.
you can fix this issue by ask codex cli to fix according to current issue url(#40700)