Windows Codex Desktop fails on second launch with Access denied / AppModel Runtime 0x80070005; Reset-AppxPackage allows one launch only
What version of the Codex App are you using (From “About Codex” dialog)?
OpenAI.Codex_26.623.19656.0_x64__2p2nqsd0c76g0
What subscription do you have?
GPTplus
What platform is your computer?
Microsoft Windows NT 10.0.26200.0 x64
What issue are you seeing?
Codex Desktop on Windows can launch exactly once after installation or after running Reset-AppxPackage. After closing the app, the second launch fails with "Windows cannot access the specified device, path or file. You may not have the appropriate permissions to access the item". The issue reproduces even before signing in, so it does not appear to be related to account/login state.
What steps can reproduce the bug?
- Install Codex Desktop, or run:
Get-AppxPackage OpenAI.Codex | Reset-AppxPackage
- Launch Codex.
- Codex launches successfully.
- Close Codex.
- Launch Codex again.
What is the expected behavior?
Codex Desktop should launch normally every time.
Additional information
The second launch fails with "Access is denied". No window appears. Starting from the Windows Start menu also fails.
Running:
codex app
previously produced:
Opening Codex Desktop workspace C:\Users\<redacted>...
Start-Process : This command cannot be run due to the error: Access is denied.
Important observations
- Reset-AppxPackage allows exactly one successful launch.
- Closing Codex and killing Codex/codex processes does not fix the next launch.
- Deleting HKCU:\Software\Classes\codex does not fix the next launch.
- The issue reproduces even when Codex is not signed in.
- Updating, repairing, uninstalling/reinstalling, and changing directory permissions did not permanently fix the issue.
- Package status is OK:
Name : OpenAI.Codex
PackageFullName : OpenAI.Codex_26.623.19656.0_x64__2p2nqsd0c76g0
Status : Ok
Windows Event Log
After the failed second launch, AppModel Runtime logs:
ProviderName : Microsoft-Windows-AppModel-Runtime
Id : 208
LevelDisplayName : Error
Message : 0x80070005: Cannot create the process for package OpenAI.Codex_26.623.19656.0_x64__2p2nqsd0c76g0 because an error was encountered while configuring runtime. [LaunchProcess]
Before the failure, after Reset-AppxPackage, the logs show that Windows successfully created the Desktop AppX container and created the Codex process. After the app was closed, the Desktop AppX container was destroyed. The next launch then fails with Event ID 208 / 0x80070005.
Workaround
Running the following allows one successful launch only:
Get-AppxPackage OpenAI.Codex | Reset-AppxPackage
Start-Process "shell:AppsFolder\OpenAI.Codex_2p2nqsd0c76g0!App"
After closing Codex, the problem returns.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗