codex icon indicating copy to clipboard operation
codex copied to clipboard

AppX errors 0X80073D02 - 0x8007045B ( OpenAI.CodexPrimaryRuntime ) / x64 Chat GPT/Codex for Windows

Open mdruy opened this issue 1 week ago • 6 comments

What version of the Codex App are you using (From “About Codex” dialog)?

26.1111.9664.0 - 26.1117.3838.0

What subscription do you have?

Plus

What platform is your computer?

Microsoft Windows NT 10.0.26300.0 x64

What issue are you seeing?

Since more than a week (also after Windows 2026-10 Preview Update (KB5127936) and 2026-11 Security Update (KB5132061) on 11/11/2026), underlying AppX deployment, AppContainer, and package cleanup bugs introduced in this build are also impacting the Desktop ChatGPT / Codex app.

The ChatGPT for Windows and Codex App is throwing new errors and bugs. These 0x80073D02 (ERROR_PACKAGES_IN_USE) errors cannot be resolved on the user side—regardless of any troubleshooting. They only disappear when uninstalling ChatGPT and immediately reappear upon reinstallation:

At every boot (AppXDeployment-Server - 3 errors) — svchost.exe (wsappx -p)

  • Error 0x80073D02: The request cannot be processed because package OpenAI.CodexPrimaryRuntime.<version>_x64__3k8sg7r9htsxt is in use.
  • Deployment Remove operation with target volume C: on Package OpenAI.CodexPrimaryRuntime.<version>_x64__3k8sg7r9htsxt from: (OpenAI.CodexPrimaryRuntime.<version>_x64__3k8sg7r9htsxt) failed with error 0x80073D02.
  • AppX Deployment operation failed for package OpenAI.CodexPrimaryRuntime.<version>_x64__3k8sg7r9htsxt with error 0x80073D02. The specific error text for this failure is: Error 0x80073D02: The request cannot be processed because package OpenAI.CodexPrimaryRuntime.<version>_x64__3k8sg7r9htsxt is in use.

Every time the ChatGPT / Codex app is opened (AppXDeployment-Server - 2 errors)

  • Error 0x80073D02: The request cannot be processed because package OpenAI.CodexPrimaryRuntime.<version>_x64__3k8sg7r9htsxt is in use.
  • Deployment Remove operation with target volume C: on Package OpenAI.CodexPrimaryRuntime.<version>_x64__3k8sg7r9htsxt from: (OpenAI.CodexPrimaryRuntime.<version>_x64__3k8sg7r9htsxt) failed with error 0x80073D02.

Pre-existing errors on exits/reboots

These errors were already appearing occasionally before these updates (for months) on exits/reboots as Codex/OpenAI tries to start this system service early (along with the Codex OpenAI Sandbox service not being able to complete the function - error OS 1800 on the subsequent boot):

  • AppXDeployment (2): Failed to start system service: appxsvc with error: 0x8007045B (2)
  • CodexSandboxService.OpenAI.Codex (2, sometimes 4): unable to restore package uninstall listener: open the logged-in user’s token and os error 1008 (the last error records disappear when DelayedStart 1 is added to the service).

Also introduced with a recent Windows November Update (AppModel-Runtime) and only happening on Codex/Chat GPT Windows installations.

  • DeleteAppContainerProfile failed with error 0x800706D9 because it was unable to unregister with the firewall.
  • CreateAppContainerProfile failed for AppContainer onecore\ds\security\gina\profile\profext\appcontainer.cpp Line:1962 defenderaiplatformhost DefenderAiPlatformHost with error 0x800706D9.

What steps can reproduce the bug?

  • One time: Install the ChatGPT desktop app from Microsoft Store and sign in.

  • Restart Windows.

  • Do or do not not manually launch ChatGPT or use Codex.

  • Open the Windows Application event log.

  • Observe the errors on boot : 3 AppXDeployment-Server (0x80073D02), 2 AppModel-Runtime (0x800706D9)

  • Occionally also 2 CodexSandboxService.OpenAI.Codex` (can't complete function / unable to restore package uninstall listener error 1008).

  • Observe also other errors from shutdown/reboot such as 2 AppXDeployment: Failed to start system service: appxsvc with error: 0x8007045B.

  • Repeat the restart: the same errors return.

  • Open the Chat GPT desktop app

  • Observe 3 0x80073D02 (ERROR_PACKAGES_IN_USE) for OpenAI.CodexPrimaryRuntime

What is the expected behavior?

  1. No errors should appear in Event Viewer on boot or opening the Chat GPT Desktop app for the runtime package.
  2. The installed tasks and services should start or deploy successfully without producing bugs, duplicate errors after every single boot, including or besides when ChatGPT is not opened or used.
  3. The app package should be deployed or removed succesfully especially when resources are not in use.

Additional information

Reinstalling or a clean Windows/PC reset and installation does not fix this. The version is marked with a placeholder because it updates frequently to a new version package, keeps trying to remove the current one, and keeps failing on boot—even when ChatGPT is not running or anything.

The only way to fix these errors is by uninstalling Codex / the Desktop ChatGPT app, but it comes back again after reinstalling — I have been through every troubleshooting step.

Note: Please note that I monitor all logs (errors and alerts) across all log sources and files, not just the ones filtered under Administrative Events.

Version app : until 26.1117.3838.0 Windows 11 Pro - 26H2 - 26300.9974 to 26300.10075

Errors started to appear after 30 October - 10 November 2026 - not before.

mdruy avatar Nov 21 '26 00:11 mdruy

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

  • #62596

Powered by Codex Action

github-actions[bot] avatar Nov 21 '26 00:11 github-actions[bot]

Additional verification: the active runtime is queued for removal

I reproduced this on Windows 11 26H2 with desktop package 26.1117.3838.0 and runtime 26.1119.907.0. The installed bootstrap calls pinPrimaryRuntimePackage and then deferPrimaryRuntimeRemoval for the same selected framework. The Windows StateRepository has a persistent file-backed package dependency for that runtime, pointing to LocalState/PrimaryRuntime.lifetime.

  • At app launch, Event 401 identifies ChatGPT.exe with DeploymentOptions=0x2000. At boot, a separate Remove activity identifies svchost.exe,AppReadiness with DeploymentOptions=0x0. Both stop at DynamicDependenciesInUse with 0x80073D02. The boot failure also occurred with the Codex sandbox service stopped.
  • An older trace on November 17 shows the same caller, flags and failure stage for runtime 26.1116.1220.0, at boot (22:31:55.796) and on launch (23:21:16.372), before KB5132057 was installed. The older source MSIX still exists, while the current runtime's source archive was cleaned from LocalCache. Both cases fail at the dependency check.
  • All 26,157 files listed in the two installed package block maps matched their hashes. The currently published signed x64 MSIX has the same app version and identical bootstrap archive, native updater and sandbox service binaries as the installation I tested.
  • In a captured shutdown, the two 0x8007045B records came from the stopping Codex sandbox service PID. The separate startup 1008 events concern restoring the uninstall listener before the owner's logon token is available (#50719). The Defender 0x800706D9 error appeared before the OpenAI Remove activity during a captured boot. Its causal link to this runtime remains unverified.

Could the desktop client avoid queuing removal of the selected framework while it has a persistent dependency, or can the boot path preserve deferral until the dependency is released? Please identify a fixed desktop build or a supported setting that avoids the recurring errors. No package or service was changed for these checks.

mdruy avatar Nov 21 '26 02:11 mdruy

I reproduced the 0x80073D02 error for OpenAI.CodexPrimaryRuntime on Windows 11 Pro 26H2 x64, build 26300.9974. The Microsoft Store app version is 26.1117.4957.0, and the runtime version was 26.1119.907.0.

On the same PC, the desktop app freezes on the first click in my primary Windows profile but works in a second profile with the same app version. With a fresh .codex directory, the app still froze at the account picker, before sign-in.

  • Before reinstalling, Get-AppxPackage -AllUsers listed the app and runtime as installed for both profiles. When queried separately from each profile, the runtime status was NotAvailable in the affected profile and Ok in the working profile. Neither package appeared in Get-AppxProvisionedPackage -Online.
  • Re-registering the runtime failed with 0x80073D3C (pending removal). Removing it immediately after reboot, before launching the app, failed with 0x80073D02 at DynamicDependenciesInUse. An elevated Process Explorer search for CodexPrimaryRuntime returned no matches.
  • After uninstalling the app in the affected profile, rebooting, and reinstalling it from Microsoft Store, Get-AppxPackage lists only OpenAI.Codex with status Ok. The runtime is no longer listed in that profile, and the UI still freezes.

I haven't established whether the AppX failure and the UI hang share a cause. Is the runtime expected to be registered again on launch in this build? I can provide redacted AppX deployment logs and desktop startup logs from both profiles if helpful.

Alex-ok2005 avatar Nov 23 '26 22:11 Alex-ok2005

I did 3 times a hard PC erase/reset and clean Windows 11 Pro 26H2 x64 install. The issues persist.

Same experience and I did a fresh reinstall of Windows 11 and everything to make sure its reproducable.

My Chat GPT - Work has been stuck in ''Thinking'' reguarly, and every new prompt doesnt get delivered and in fact vanishes on stop or refresh. Holy and it was already braindead and useless on Very High Sol 6.2. - it feels Sol 6.2 isnt even ''available''.

Now they have fully removed the Local computer for Chat GPT Work , logically since the app doesnt run locally anymore but from the Windowsapps. Sandbox installation also provides the SandboxUsers with each their own user folder now. Useless. Codex CLI and any even uses and run from WindowsApps folder.

Chat GPT keeps asking at the same time to load and remove the same actual runtime package every boot and every time the app is openened.

mdruy avatar Nov 23 '26 22:11 mdruy

Following up on the pinPrimaryRuntimePackage / deferPrimaryRuntimeRemoval / LocalState/PrimaryRuntime.lifetime analysis — the reporter of the new issue below can confirm the file-backed dependency exists on their machine too, and has some additional evidence that separates the error loop from the update hang.

New issue: https://github.com/openai/codex/issues/63578

Confirmations and differences:

  • LocalState\PrimaryRuntime.lifetime and LocalState\PrimaryRuntime.selection.lock are both present (0 bytes, created 2026-11-08) — consistent with the persistent file-backed dependency you described.
  • The DeferredRemoval markers are child keys (not values) under HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\DeferredRemoval\<SID>\PackageFullNames\, e.g. OpenAI.CodexPrimaryRuntime.v26-1119-907-0_... and ...v26-1123-915-0_....
  • As in your report, Remove-AppxPackage on an idle NotAvailable runtime never returns (timed out after 90 s, package still present), and Restart Manager reports no process holding any file in those package directories — so it is not a file-handle lock.
  • Difference: this machine has neither KB5127936 nor KB5132061 installed, and none of the companion errors (0x8007045B, 0x800706D9, os error 1008) ever appear — 0 hits over 14 days. The 0x80073D02 loop still reproduces.

The main finding of the new issue is that the update hang is a separate problem from the 0x80073D02 error loop: a leftover codex-chrome-native-host.exe (the ChatGPT browser extension's native messaging host) holds the old package's deployment metadata open, so PackagesInUseClosed is never satisfied and the register is cancelled after ~10 minutes. The hosts in my case ran with --parent-window=0 (background service worker) and survived 13–25 hours without the extension being in use.

If it is useful for the (A) investigation: the reporter also observed the DynamicDependenciesInUse stop happening at two different actors — ChatGPT.exe with DeploymentOptions=0x2000 at app launch, and svchost.exe,AppReadiness with DeploymentOptions=0x0 at boot — which matches your description.

ChinningPan avatar Nov 24 '26 08:11 ChinningPan

I captured this again on November 25 after a Windows reinstall. Current setup: Windows 11 26H2 26300.10075, desktop MSIX 26.1120.6357.0, Primary Runtime 26.1123.915.0. There are three AppX removal activities for that runtime with 0x80073D02, one from App Readiness after boot and two from ChatGPT.exe at launch. Event 401 refers to a package in use by DynamicDependencies. The desktop log records framework activation and a deferred-removal request around both app launches.

I found three runtime paths in configuration snapshots. On October 28, the Node REPL and CLI pointed to the per-user runtime under %LOCALAPPDATA%\OpenAI\Codex. A November 25 backup still used the per-user layout with a different runtime ID. The active config on November 25 and the running Node REPL point to the desktop package under WindowsApps\OpenAI.Codex_...\app\resources. Separately, the process tree shows a ChatGPT child node.exe and Codex's pwsh.exe running from the WindowsApps\OpenAI.CodexPrimaryRuntime_... framework. These are real path selections, not just stale values in a document. The visible Node child started after the most recent failed removal, so it cannot identify the holder at that earlier instant.

The elevated AppX query still shows the desktop package as Ok and the framework as NotAvailable. DISM CheckHealth and SFC verifyonly both succeeded. The duplicate sandbox-service 1008 records are a separate boot symptom.

Please clarify what selects and rewrites these runtime paths, and what supported trace would identify the dependency owner at the instant App Readiness or ChatGPT requests removal. I can compare another build against this capture.

mdruy avatar Nov 25 '26 18:11 mdruy