[Windows][Startup blocker] 26.820 cannot relocate Application Protected codex.exe (ERROR_ENCRYPTION_FAILED)
What version of the Codex App are you using (From “About Codex” dialog)?
26.820.7780.0 (Microsoft Store/MSIX)
Bundled CLI: codex-cli 0.150.0-alpha.8
What subscription do you have?
ChatGPT Plus
What platform is your computer?
Windows 10 22H2 x64, OS Build 19045.6466
Microsoft Store / MSIX installation
What issue are you seeing?
Codex Desktop became completely unable to start after the Microsoft Store updated it from 26.818.8289.0 to 26.820.7780.0.
Without CODEX_CLI_PATH, startup fails with this 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 is a complete startup blocker and cost me approximately one working day.
The bundled files are not missing. All of these files exist:
app\resources\codex.exe
app\resources\codex-code-mode-host.exe
app\resources\codex-windows-sandbox-setup.exe
app\resources\codex-command-runner.exe
Technical root-cause evidence:
app.asardetects thatcodex.exeis underWindowsAppsand attempts to relocate it and its three sibling executables into:
``text``
%LOCALAPPDATA%\OpenAI\Codex\bin\<hash>
- The relocation implementation uses Node.js
fs.copyFileSync().
- The source executables are marked
Encryptedwith:
``text``
Compatibility Level: Application Protected
- Copying them fails with:
``text``
The specified file could not be encrypted.
This corresponds to ERROR_ENCRYPTION_FAILED / Win32 error 6000.
- The destination cache contains only
rg.exe.codex.exeand its three sibling executables are absent.
- The resolver treats the relocation failure as if the CLI were missing and shows the misleading “Unable to locate the Codex CLI binary” dialog.
- A byte-identical copy of the bundled
codex.exeoutsideWindowsAppsruns correctly. SettingCODEX_CLI_PATHto that external copy allows Desktop to start.
The package is stored on the secondary AppX volume D:\WindowsApps and exposed through the standard C:\Program Files\WindowsApps package junction. Previous Codex versions worked in this same configuration.
The MSIX manifest declares Windows.Desktop MinVersion="10.0.19041.0". This computer runs build 19045 and is therefore within the package's declared minimum version.
What steps can reproduce the bug?
- Configure the Microsoft Store default app volume as a secondary NTFS drive.
- Install or update Codex Desktop through Microsoft Store to 26.820.7780.0.
- Confirm that the bundled resource is Application Protected:
``powershell``
$pkg = Get-AppxPackage OpenAI.Codex
cipher /c "$($pkg.InstallLocation)\app\resources\codex.exe"
- Ensure
CODEX_CLI_PATHis not set. - Fully close and reopen Codex Desktop.
- Observe “Unable to locate the Codex CLI binary.”
- Inspect
%LOCALAPPDATA%\OpenAI\Codex\binand observe that the expected relocatedcodex.exegroup was not created. - Copying the source manually with
Copy-Itemreproduces:
``text``
The specified file could not be encrypted.
What is the expected behavior?
Codex Desktop should start normally using its bundled CLI.
When relocating Application Protected files from WindowsApps, the app should use a Windows copy method equivalent to COPY_FILE_ALLOW_DECRYPTED_DESTINATION or xcopy /G, then verify the copied files.
A relocation failure should expose the underlying ERROR_ENCRYPTION_FAILED instead of incorrectly reporting that the CLI is missing.
Additional information
This is the native-Windows startup-blocking variant of the protected-file relocation problem already reported in:
- #25220
- #25571
- #32403
- #34764
- #38696
First observed: 2026-08-26.
<img width="554" height="166" alt="Codex startup error: Unable to locate the Codex CLI binary" src="https://github.com/user-attachments/assets/dff99720-68e7-464f-aba6-4d95cc608071" />
Restarting Windows, reinstalling/rolling back the MSIX, and verifying the package signature did not provide a permanent fix.
Current workaround: CODEX_CLI_PATH points to an external copy of codex.exe. Restoring this variable immediately restores startup.
No WindowsApps ACLs, package files, or encryption settings were modified.
2 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
Confirmed as a duplicate of #40700. I have added my Windows 10 / secondary AppX volume reproduction details there so the evidence remains centralized in the main report.