Windows Store Codex repeatedly fails to update because old MSIX package remains locked/in use
What version of the Codex App are you using (From “About Codex” dialog)?
Microsoft Store / MSIX package.
Observed update path:
- Previous installed package:
OpenAI.Codex_26.527.3686.0_x64__2p2nqsd0c76g0 - Target package staged by Store/AppX:
OpenAI.Codex_26.527.7698.0_x64__2p2nqsd0c76g0 - Store ProductId:
9PLM9XGG6VKS - Package family:
OpenAI.Codex_2p2nqsd0c76g0
After manual repair, the machine is now successfully on OpenAI.Codex_26.527.7698.0_x64__2p2nqsd0c76g0.
What subscription do you have?
Not relevant to the Store/AppX update failure.
What platform is your computer?
- OS: Microsoft Windows 10 Enterprise
- Version:
10.0.19044 - Architecture: x64
- Install source: Microsoft Store /
wingetmsstore
What issue are you seeing?
Codex Desktop from Microsoft Store repeatedly fails to update on Windows. The update reaches the AppX/MSIX registration phase, then fails because Windows still considers the old OpenAI.Codex package/application to be in use.
This has happened repeatedly on the same machine, and also on another machine in the same LAN.
Recent AppXDeployment-Server failures included:
0x80073CF90x8007001F0x80073D02
Representative AppX message:
Deployment Register operation failed because OpenAI.Codex_2p2nqsd0c76g0!App needs to be closed.
The staged target manifest existed at the time of failure:
C:\Program Files\WindowsApps\OpenAI.Codex_26.527.7698.0_x64__2p2nqsd0c76g0\AppxManifest.xml
But registration was blocked by the old package state.
What steps can reproduce the bug?
This happens during Store/MSIX updates, not during a normal in-app action. The rough pattern is:
- Install Codex Desktop from Microsoft Store.
- Use Codex normally for a while.
- Let Microsoft Store stage a newer Codex package update.
- The update fails during AppX registration.
- Closing visible Codex windows is not enough; Windows still reports the old package/app as in use.
During local diagnostics, stale old-package state remained after closing visible Codex windows. Observed blockers included:
SearchApp.exe file handles:
...\Microsoft.Windows.Search_cw5n1h2txyewy\LocalState\AppIconCache\100\OpenAI_Codex_2p2nqsd0c76g0!App
svchost.exe package/container job handle:
\Container_OpenAI.Codex_26.527.3686.0_x64__2p2nqsd0c76g0-...
Mounted AppX/Helium registry hives for OpenAI.Codex
A direct attempt to register the already-staged new package after closing visible app processes still failed with:
Add-AppxPackage: 0x80073D02
The package could not be installed because resources it modifies are currently in use.
OpenAI.Codex_26.527.3686.0_x64__2p2nqsd0c76g0 needs to be closed.
What is the expected behavior?
Codex should update cleanly through Microsoft Store without requiring a reboot or manual AppX cleanup.
If Codex needs to restart itself for update, it should fully release package/container/AppX state, or provide a robust update flow that handles stale app package locks.
Actual behavior
The app/update flow repeatedly leaves the old package considered "in use", causing Store/AppX registration to fail. The user is forced into repeated manual repair, package unregister/reinstall, or reboot-like cleanup.
Workaround used locally
The update succeeded only after manually quiescing the old package state:
- Close Codex.
- Close stale Codex-related package handles.
- Unload stale
OpenAI.CodexAppX/Helium registry hives. - Remove the current user's old AppX package registration.
- Reinstall from Microsoft Store:
winget install --id 9PLM9XGG6VKS --source msstore --accept-source-agreements --accept-package-agreements
After this, the package registered successfully:
OpenAI.Codex_26.527.7698.0_x64__2p2nqsd0c76g0
Status: Ok
AppXDeployment-Server then logged successful registration:
Deployment Register operation with target volume C: on Package OpenAI.Codex_26.527.7698.0_x64__2p2nqsd0c76g0 from: (AppxManifest.xml) finished successfully.
Post-repair checks showed:
No mounted OpenAI.Codex hives found.
No stale Codex-related handles found.
Additional information
This makes every Store update fragile for users who keep Codex running for long coding sessions. A reboot may implicitly clear the same package/container state, but requiring a reboot for frequent app updates is a poor update experience.
The failure appears to be in the Windows Store/MSIX update lifecycle around releasing the old package identity, rather than in normal application runtime behavior after the package is successfully installed.
Additional repeated repro data from the same machine.
This is still happening on later Microsoft Store/MSIX updates. The pattern remains the same: Store successfully stages the new package, then AppX Register fails because Windows still reports OpenAI.Codex_2p2nqsd0c76g0!App as running.
Observed update failures after the original report:
2026-06-03 17:25 local time
OpenAI.Codex_26.527.7698.0_x64__2p2nqsd0c76g0 -> OpenAI.Codex_26.601.2237.0_x64__2p2nqsd0c76g0
Register failed: 0x80073CF9 / 0x8007001F
Reason text: needs to close OpenAI.Codex_2p2nqsd0c76g0!App
Blockers observed: svchost.exe package container job handle, SearchApp.exe AppIconCache handles, mounted AppX/Helium hives
2026-06-05 11:02 local time
OpenAI.Codex_26.601.2237.0_x64__2p2nqsd0c76g0 -> OpenAI.Codex_26.602.3474.0_x64__2p2nqsd0c76g0
Register failed: 0x80073CF9 / 0x8007001F
Reason text: needs to close OpenAI.Codex_2p2nqsd0c76g0!App
Blockers observed: svchost.exe package container job handle, SearchApp.exe AppIconCache handles, mounted AppX/Helium hives
2026-06-16 09:55 local time
OpenAI.Codex_26.609.4994.0_x64__2p2nqsd0c76g0 -> OpenAI.Codex_26.609.9530.0_x64__2p2nqsd0c76g0
Register failed: 0x80073CF9 / 0x8007001F
Reason text: needs to close OpenAI.Codex_2p2nqsd0c76g0!App
Blockers observed: svchost.exe package container job handle, mounted AppX/Helium hives
2026-06-17 09:17 local time
OpenAI.Codex_26.609.9530.0_x64__2p2nqsd0c76g0 -> OpenAI.Codex_26.611.7849.0_x64__2p2nqsd0c76g0
Register failed: 0x80070005
Reason text: needs to close OpenAI.Codex_2p2nqsd0c76g0!App
Blockers observed: SearchApp.exe AppIconCache handles
2026-06-17 14:55 local time
OpenAI.Codex_26.611.7849.0_x64__2p2nqsd0c76g0 -> OpenAI.Codex_26.611.8273.0_x64__2p2nqsd0c76g0
Register failed: 0x80073CF9 / 0x8007001F
Reason text: needs to close OpenAI.Codex_2p2nqsd0c76g0!App
Blockers observed: svchost.exe package container job handle, SearchApp.exe AppIconCache handles, mounted AppX/Helium hives
Representative AppX event shape on each failure:
Deployment Register operation with target volume C: on Package OpenAI.Codex_<new version>_x64__2p2nqsd0c76g0 from: (AppxManifest.xml) failed with error 0x8007001F / 0x80070005.
Packages were not updated because affected apps are still running.
Running apps: {OpenAI.Codex_2p2nqsd0c76g0!App}
The reliable manual repair has been one of these, depending on how stuck the package state is:
- Close stale Codex-related handles (
SearchApp.exeAppIconCache handles and/or thesvchost.exepackage container job handle). - Unload stale
OpenAI.CodexAppX/Helium hives when present. - Retry
Add-AppxPackage -Registeragainst the already stagedAppxManifest.xml. - If AppX still claims the old app is running even with no handles/hives left, remove the current user's old AppX package registration and reinstall from Store:
winget install --id 9PLM9XGG6VKS --source msstore --accept-source-agreements --accept-package-agreements
The latest successful repair ended at:
OpenAI.Codex_26.611.8273.0_x64__2p2nqsd0c76g0
Status: Ok
Deployment Register operation ... finished successfully at 2026-06-17 15:03 local time
No mounted OpenAI.Codex hives found
No stale Codex-related handles found
This now appears to reproduce on nearly every Store update on this machine, so it looks like a deterministic Windows Store/MSIX update lifecycle issue around releasing the old package identity, not a one-off corrupted install.
Additional independent reproduction and a controlled success comparison from a different Windows machine.
Environment
- Windows 11 Enterprise 24H2, build 26100, x64
- Microsoft Store package family:
OpenAI.Codex_2p2nqsd0c76g0 - Affected update:
26.810.4967.0 -> 26.810.6296.0 - Co-installed legacy app:
OpenAI.ChatGPT-Desktop_1.2026.190.0_x64__2p2nqsd0c76g0
Historical failure evidence
On 2026-08-14, AppX began a Register operation for OpenAI.Codex while package-owned processes were still running. About four seconds later it failed with:
0x80073D02
Unable to install because the following apps need to be closed:
OpenAI.Codex_2p2nqsd0c76g0
Two Application Hang event 1002 records for ChatGPT.exe followed in the same incident window. Later repair/remove attempts produced 0x80070490 (package repository / element not found) and 0x80073CFA de-stage/remove failures. The user-facing recovery cycle had repeatedly become repair/reset/reinstall before the app would launch again.
The machine also had ChatGPT Classic installed, but package identity inspection rules out a visible-name or Task Manager collision:
New ChatGPT/Codex:
OpenAI.Codex_2p2nqsd0c76g0!App
ChatGPT Classic:
OpenAI.ChatGPT-Desktop_2p2nqsd0c76g0!ChatGPT
They have different package families, AUMIDs, install roots, executables, and protocols. Classic remained Status: Ok. A Beta package had also been installed and shared the codex: protocol with Stable; it was removed before the controlled reproduction below.
Controlled successful update comparison
On 2026-08-15, the in-app Update action was run while an independent observer recorded package/process state. The observer did not force-close any residual process.
Timeline:
09:58:11 AppX Stage for OpenAI.Codex_26.810.6296.0 starts
09:58:12 Event 400: Deployment Stage finished successfully
09:58:13 Original Electron main process exits naturally
09:58:13 RegisterByPackageFamilyName starts with:
ForceTargetApplicationShutdownOption,
RegisterHighestVersion,
FailIfNeedsRemediation
09:58:14 Event 400: Deployment Register finished successfully
09:58:14 Old 26.810.4967.0 package folder moved to WindowsApps\Deleted, Result 0x0
09:59:50 Next desktop-app log session starts on 26.810.6296.0
Post-update evidence:
- Registered version advanced to
26.810.6296.0 - Package status
Ok - Store signature, package family, and AUMID valid
- Old package process count was zero
- Old versioned install root was removed
- No Codex-related AppX error event
- No ChatGPT Application Hang event
- ChatGPT Classic remained running and usable throughout
- Both distinct AUMIDs now expose their own live windows
This comparison supports the theory that the critical boundary is fully quiescing the old OpenAI.Codex process tree before/during Register, not the coexistence of ChatGPT Classic.
Store catalog / manifest mismatch observed after success
The new app log then recorded:
buildVersion=26.810.6296.0
manifestBuildVersion=26.810.7004.0
canSilentlyDownload=true
completed=false
hasUpdate=false
overallState=NoUpdates
So the OpenAI manifest was already ahead of the version the Microsoft Store would offer. This did not crash the new build, but it makes updater state and user messaging ambiguous.
Requested updater behavior
- Before Register, deterministically stop and await all app-owned Electron/backend descendants, including tray-resident processes.
- Make post-update relaunch deterministic or show a clear notification if a manual relaunch is required.
- Treat “manifest is newer but Store says NoUpdates” as a normal staged-rollout state, without presenting an unusable update action.
- Preserve the prior usable registration or provide a supported recovery path instead of forcing users into repair/reset/reinstall loops.
- Add telemetry/logging around the transition from Store download/Stage to process shutdown and user Register.
Privacy: usernames, hostnames, SIDs, project names, conversation contents, session IDs, and full user-profile paths were intentionally omitted.
I can confirm that this issue is still reproducible on newer Codex Desktop versions.
Environment
- Windows 10 Pro, version 22H2, build 19045, x64
- Codex Desktop installed through Microsoft Store/MSIX
- Package family:
OpenAI.Codex_2p2nqsd0c76g0 - Current successfully repaired version:
26.831.1445.0
The same update failure pattern has occurred on this machine at least four times. Below are the two most recent complete event timelines.
2026-08-30
The updater successfully staged:
- Previous registered version:
26.825.5331.0 - Target staged version:
26.825.6671.0
AppXDeploymentServer then attempted RegisterByPackageFamilyName with ForceTargetApplicationShutdownOption, but registration failed because Windows still considered the app running:
- Event 638: package was not updated because
OpenAI.Codex_2p2nqsd0c76g0!Appwas still running - Event 419:
0x8007001F, the application needed to be closed - Event 401: Register operation failed with
0x8007001F - Event 404: deployment failed with
0x80073CF9
After explicitly terminating all ChatGPT/Codex processes, I ran the following from Windows PowerShell 5.1:
Add-AppxPackage `
-RegisterByFamilyName `
-MainPackage 'OpenAI.Codex_2p2nqsd0c76g0' `
-ForceApplicationShutdown
Registration then completed successfully with Event 400, upgrading the registered package to 26.825.6671.0.
2026-09-02
The same sequence happened again:
- Previous registered version:
26.825.6671.0 - Target staged version:
26.831.1445.0 - Stage completed successfully
- Registration attempted with
ForceTargetApplicationShutdownOption - Events 638 and 419 reported that the app was still running
- Events 401 and 404 reported registration failure (
0x8007001F/0x80073CF9)
After terminating the processes and running the same Add-AppxPackage -RegisterByFamilyName recovery command, registration completed successfully in approximately 0.5 seconds with Event 400.
The current package state is now:
Version : 26.831.1445.0
Status : Ok
Conclusion
This suggests that the downloaded/staged MSIX package is healthy. The failure appears to be a race between the updater shutting down the existing Codex/ChatGPT processes and starting AppX registration.
The updater appears to begin registration before the old application/container state has been fully released. Once the processes are explicitly quiesced, the already-staged package registers immediately without another download or reinstall.
Could the updater wait for complete process/container termination before starting RegisterByPackageFamilyName, and retry registration if Windows still reports the package as in use?
I can reproduce this on two Windows 10 machines.
Subscription: ChatGPT Plus OS: Windows 10 Pro 22H2, build 19045 Installed version: 26.901.1978.0 Target version: 26.901.2854.0
Reproduction:
- Launch the ChatGPT/Codex desktop app.
- Start the in-app update.
- The UI shows “Installing update — Preparing…”.
- The app closes but never restarts. No error is shown.
Controlled server reproduction:
- Staging 26.901.2854.0 completed successfully.
- RegisterByPackageFamilyName then started with ForceTargetApplicationShutdownOption and RegisterHighestVersion.
- AppX logged “TerminateApplications successful” twice.
- Immediately afterward it reported: “Packages were not updated because affected apps are still running: OpenAI.Codex_2p2nqsd0c76g0!App”
- Registration failed before PackagesInUseClosed with 0x80070005.
- The complete 11-process Electron/Codex tree reached zero about 300 ms after AppX had already failed.
- The updater did not retry, surface the error, or relaunch the app.
Failed updater ActivityId: fd4ec14a-3a4f-0006-993b-89fd4f3add01
A/B verification: After confirming zero matching processes for 10.1 seconds, I ran the same RegisterByPackageFamilyName operation manually. It succeeded immediately, and the per-user registered version changed to 26.901.2854.0 (Status: Ok).
Successful registration ActivityId: fd4ec14a-3a4f-0005-027b-75fd4f3add01
This strongly suggests a shutdown/registration race in the in-app updater. It should wait for package processes to disappear, retry the registration when PackagesInUseClosed is not reached, surface the failure, and only promise a restart when one will actually occur.
Related, different symptom: #45511.
This thread concerns Store/MSIX update registration while the old package remains in use. Its comments report several HRESULTs, including 0x80070005, so the operation and package state are the useful distinction.
#45511 instead retained package Status: Ok and concerns a cold-start Windows cannot access the specified device, path, or file dialog. Its natural failure recorded Event 208 at FinishPackageActivation; a later controlled ACL withdrawal on a newer version recorded Event 208 at LaunchProcess.
If that is the dialog you see after a genuine process exit, start with read-only package and profile evidence. Please do not treat the ACL intervention as a fix for the update-lock path described here.
Additional reproduction with a precise Stage/Register split and a recovery trap that re-registers the old version.
Environment
- Windows 11 Home (Chinese), 25H2, build
26200.9550, x64 - Microsoft Store/MSIX package family:
OpenAI.Codex_2p2nqsd0c76g0 - Previously/currently registered version:
26.917.8451.0 - Target version:
26.917.9434.0 - Local timezone: UTC+8
Verified AppX timeline (2026-09-24 local time)
-
17:36:47 —
AppXDeploymentServer/OperationalEvent 400: Stage forOpenAI.Codex_26.917.9434.0_x64__2p2nqsd0c76g0completed successfully. -
17:37:06 — Events 603/854/855 started Register against the
9434AppxManifest.xml. The deployment options did not include forced target shutdown. Event 638 listedOpenAI.Codex_2p2nqsd0c76g0!Appas still running; Events 419/404 failed with0x80073D02and required the old app to close. -
17:38:37 — Store retried with
RegisterByPackageFamilyName. Event 603 included:ForceTargetApplicationShutdownOption RegisterHighestVersion FailIfNeedsRemediationStore
Install-Agentidentified the caller as:Update;ChatGPT-SearchForUpdatesWithPausedAddAsync -
17:38:38 — Event 704 failed with
0x80070005while "determining which applications need to be closed." Event 605 said thePackagesInUseClosedstate handler failed; Event 613 said the deployment failed to reach statePackagesInUseClosed. The oldCodexSandboxServicehad already been reported as terminated successfully immediately before this failure. -
17:38:38–17:38:44 — Event 649 attempted to repair ACLs on the
9434package directory and reportedACLs repaired successfully, but Register still failed. The old and new package directories currently have the same owner/ACL text (SYSTEMowner; Users read/execute; SYSTEM and TrustedInstaller full control). -
17:38:44 / 17:38:53 —
WindowsUpdateClientEvent 20 and StoreInstall-AgentEvent 2006 reported failure for9PLM9XGG6VKS-OpenAI.Codex; Store recordedHResult = -2147024891(0x80070005). -
18:02:21 — A manual recovery command successfully registered the old
8451manifest. 18:02:41 — Stage for9434completed successfully again, but there is still no successful Register event for9434.
Current state:
Get-AppxPackage OpenAI.Codex -> 26.917.8451.0, Status: Ok
C:\Program Files\WindowsApps\OpenAI.Codex_26.917.9434.0_x64__2p2nqsd0c76g0\AppxManifest.xml -> exists
The target payload is therefore staged on disk, while the current user remains registered to the old version.
Recovery trap
The manual recovery used this common pattern:
$pkg = Get-AppxPackage -Name OpenAI.Codex
$manifest = Join-Path $pkg.InstallLocation 'AppxManifest.xml'
Add-AppxPackage -DisableDevelopmentMode -Register $manifest
Because Get-AppxPackage returned the currently registered 8451 package, this command re-registered 8451; it did not select the highest staged version. The app became usable again, but appeared to have rolled back even though the complete 9434 directory remained staged.
Additional exclusions and remaining gap
- C: is healthy NTFS, online, not read-only, with more than 100 GiB free.
- No Codex/ChatGPT match was found in AppLocker, Code Integrity, or Defender events for the failure window.
- The package directory ACLs do not show a version-specific difference, and AppX's own ACL repair reported success.
- Application logs confirm the Store updater detected
9434, but do not contain the deployment failure;overallState=Completedonly described the update-check operation.
The retained events do not name the exact file, registry object, process handle, or package-container object that returned ACCESS_DENIED. That lower-level object would require live ETW/ProcMon/handle capture during another reproduction. What is confirmed is that download/Stage succeeded and the failure occurred during the old-app shutdown / PackagesInUseClosed transition before per-user Register completed.
This suggests two product improvements:
- Fully quiesce the old package/container state before Register, or reliably handle failure in
PackagesInUseClosed. - Detect and report the distinct "new version staged but not registered" state. A recovery action must target the highest complete staged package, not blindly re-register the current
Get-AppxPackage().InstallLocation.
Follow-up with a read-only recovery timeline and an important correction to the earlier hypothesis.
Current recovered state
- Registered package:
OpenAI.Codex_26.917.8451.0_x64__2p2nqsd0c76g0 Get-AppxPackagestatus:OkCodexSandboxService.OpenAI.Codex:RUNNING, packaged-process service, exit codes0- ChatGPT is currently running from the registered
8451package. - The user has paused further update attempts; no update or repair was triggered during this evidence collection.
Recovery timeline (local time, UTC+8)
-
22:45:39: AppXDeploymentServer events 679/685/400 show anOnDemandRegisteroperation selecting26.917.8451.0; the operation completed successfully. -
22:46:10-22:46:11: AppX events 400/821/822 and Shell-Core event 62144 show the old package registration completing with HRESULT0. SCM event 7045 installedCodexSandboxService.OpenAI.Codexas a LocalSystem auto-start packaged service. -
22:46:11:services.exespawned the sandbox service process (PID 6736) in the old package container. -
A later
sc.exe query CodexSandboxService.OpenAI.Codexonly observed that the service was already running.sc querydid not start it and was not the recovery action. -
22:49:50and22:49:56: TWinUI event 1621 records successful AUMID activation (Result=0) forOpenAI.Codex_2p2nqsd0c76g0!App; AppModel event 201 records creation of the old-packageChatGPT.exeprocesses. The first main process was PID 25732 with Explorer as its parent. -
A direct package-identity launch also worked after registration:
explorer.exe "shell:AppsFolder\OpenAI.Codex_2p2nqsd0c76g0!App"
Therefore the recovery correlates with the successful login/on-demand registration at 22:45-22:46, not with sc query. The AppsFolder command invoked an AUMID that was already healthy again.
Two distinct failure paths
1. Original updater failure
At 17:38:38, AppX event 9648 shows the sandbox service was successfully terminated for the update. Only after that did events 704/605 fail with 0x80070005 in PackagesInUseClosed while determining which applications needed to be closed (ActivityId cafe4159-4c07-0019-7f8c-ffca074cdd01). A retry at 17:38:48 failed the same way (ActivityId cafe4159-4c07-001c-4505-ffca074cdd01).
This rules out “the sandbox service was still running” as a sufficient explanation for the original updater error: AppX had already terminated it successfully before the access-denied result.
2. Later package-registration failure
Subsequent explicit registration attempts for both staged 9434 and restaged 8451 reached the windows.service manifest extension and failed with inner 0x80070005 and outer 0x80073CF6. At different points the selected package was left in Servicing. Re-staging the signed package succeeded; registration of its packaged service was the failing step.
After reboot/login, the later OnDemandRegister operation eventually completed the old-package registration and the package returned to Ok. Existing logs do not identify the exact file, registry object, SCM object, handle, or security principal that returned ACCESS_DENIED, so we cannot responsibly attribute the failure to one ACL or process.
Requested investigation
Could the Windows updater owners please investigate these as related but distinct recovery defects?
- Why does the updater's
PackagesInUseClosedhandler return0x80070005after the packaged service was already stopped successfully? - Why can the package enter
Servicingand then fail at thewindows.serviceextension with0x80070005 / 0x80073CF6, while a later login/on-demand registration succeeds? - Can the updater log the exact denied object/operation and the package/process/service identities involved, rather than only the stage name?
- Can recovery detect this split state (new version staged, old version registered or servicing) and defer registration until a clean app exit/login instead of repeatedly retrying the same failing path?
The evidence does not support resetting WindowsApps ACLs, deleting the packaged service, or treating sc query as a fix. The current safe state is the old version registered as Ok, with updates intentionally paused pending clarification.
Follow-up: after the recovery described above, I decided to stop allowing unattended Codex updates on this Windows machine and switch to a controlled manual-update workflow.
This is not a root-cause fix for #25770. It is only an operational workaround to reduce the chance of repeatedly landing in the same broken MSIX/AppX update state while the underlying updater issue is still unresolved.
Why I changed the update workflow
The failure mode I have seen is disruptive enough that I no longer want Codex or Microsoft Store to update Codex automatically while I am in the middle of normal work.
My current workflow is:
- Keep Codex automatic updates blocked during normal use.
- When I intentionally want to update, back up the current block state first.
- Temporarily remove the update blocks.
- Perform the update manually.
- Verify the newly registered package.
- Re-enable the blocks.
The helper scripts I use also write timestamped logs and keep the console open so the result is not lost.
Important caveats
- This is a personal workaround, not an officially documented/supported Codex update policy.
CODEX_SPARKLE_ENABLED=falsehas been observed to disable the Codex in-app updater path on Windows builds, but it should be treated as an implementation-level switch that may change.- The Microsoft Store policy below is machine-wide. It disables automatic Store app updates globally, not only Codex.
- I am not changing WindowsApps ACLs, deleting packaged services, or manually editing Codex package files.
- Before manually updating, I back up the current policy state so it can be restored exactly.
Microsoft documents the Store policy mapping here: https://learn.microsoft.com/windows/msix/group-policy-msix
The relevant policy is:
HKLM\SOFTWARE\Policies\Microsoft\WindowsStore
AutoDownload (REG_DWORD) = 2
For that policy, value 2 corresponds to the enabled "Turn off Automatic Download and Install of updates" policy.
1. Block Codex automatic updates
The core PowerShell logic I currently use is:
# Disable the Codex in-app updater for the current user.
[Environment]::SetEnvironmentVariable(
"CODEX_SPARKLE_ENABLED",
"false",
"User"
)
$env:CODEX_SPARKLE_ENABLED = "false"
# Disable Microsoft Store automatic app updates globally.
$storePolicyPath = "HKLM:\SOFTWARE\Policies\Microsoft\WindowsStore"
New-Item -Path $storePolicyPath -Force | Out-Null
New-ItemProperty `
-Path $storePolicyPath `
-Name "AutoDownload" `
-PropertyType DWord `
-Value 2 `
-Force | Out-Null
I verify it with:
Get-AppxPackage OpenAI.Codex |
Select-Object Name, Version, Status, PackageFullName, InstallLocation
[Environment]::GetEnvironmentVariable(
"CODEX_SPARKLE_ENABLED",
"User"
)
Get-ItemProperty `
-Path "HKLM:\SOFTWARE\Policies\Microsoft\WindowsStore" `
-Name "AutoDownload"
Expected block state:
CODEX_SPARKLE_ENABLED = false
AutoDownload = 2
My full helper writes its transcript under:
%USERPROFILE%\Desktop\Codex_Update_Logs
and prints the installed Codex version/package status before and after changing anything.
2. CMD launcher used for UAC + persistent console
The CMD wrapper is intentionally simple:
@echo off
setlocal EnableExtensions
title Codex Update Blocker
set "SCRIPT_DIR=%~dp0"
set "PS1=%SCRIPT_DIR%Codex_Update_Block.ps1"
if not exist "%PS1%" (
echo [FAIL] PowerShell script not found:
echo %PS1%
pause
exit /b 1
)
net session >nul 2>&1
if %errorlevel% neq 0 (
echo [INFO] Requesting UAC elevation...
powershell.exe -NoProfile -ExecutionPolicy Bypass -Command ^
"Start-Process -FilePath '%~f0' -Verb RunAs"
exit /b
)
powershell.exe -NoLogo -NoProfile -ExecutionPolicy Bypass ^
-File "%PS1%" -Action Block
echo.
echo Logs:
echo %USERPROFILE%\Desktop\Codex_Update_Logs
echo.
pause
endlocal
The pause / PowerShell Read-Host is deliberate: I wanted the result to remain visible instead of the console disappearing immediately.
3. Before a manual update: back up the block state first
Before removing the blocks, my second helper records:
- currently registered Codex package/version/status;
- current user/machine value of
CODEX_SPARKLE_ENABLED; - whether the Windows Store policy key exists;
- current
AutoDownloadvalue; - a registry export of the Windows Store policy key.
Example backup logic:
$timestamp = Get-Date -Format "yyyyMMdd_HHmmss"
$backupRoot = Join-Path $env:USERPROFILE "Desktop\Codex_Update_Backups"
$backupDir = Join-Path $backupRoot "Before_Unblock_$timestamp"
New-Item -ItemType Directory -Path $backupDir -Force | Out-Null
$pkg = Get-AppxPackage -Name "OpenAI.Codex" |
Sort-Object Version -Descending |
Select-Object -First 1
$state = [ordered]@{
BackupCreatedAt = (Get-Date).ToString("o")
CodexPackage = $pkg.Name
CodexVersion = $pkg.Version.ToString()
CodexStatus = $pkg.Status.ToString()
CodexPackageFullName = $pkg.PackageFullName
CodexInstallLocation = $pkg.InstallLocation
SparkleUser =
[Environment]::GetEnvironmentVariable(
"CODEX_SPARKLE_ENABLED",
"User"
)
SparkleMachine =
[Environment]::GetEnvironmentVariable(
"CODEX_SPARKLE_ENABLED",
"Machine"
)
WindowsStorePolicyKeyExists =
Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\WindowsStore"
WindowsStoreAutoDownload = $null
}
try {
$state.WindowsStoreAutoDownload =
(Get-ItemProperty `
-Path "HKLM:\SOFTWARE\Policies\Microsoft\WindowsStore" `
-Name "AutoDownload" `
-ErrorAction Stop).AutoDownload
} catch {}
$state |
ConvertTo-Json -Depth 5 |
Set-Content `
-Path (Join-Path $backupDir "codex_update_block_state.json") `
-Encoding UTF8
reg.exe export ^
"HKLM\SOFTWARE\Policies\Microsoft\WindowsStore" ^
"$backupDir\WindowsStore_Policy_Backup.reg" ^
/y
$pkg |
Select-Object Name, Version, Status, PackageFullName, InstallLocation |
Format-List |
Out-String |
Set-Content `
-Path (Join-Path $backupDir "Codex_Package_Before_Update.txt") `
-Encoding UTF8
This gives me a small forensic/rollback snapshot before I change the update policy.
4. Temporarily unblock updates
After the backup is written:
# Remove Codex updater environment blocks.
[Environment]::SetEnvironmentVariable(
"CODEX_SPARKLE_ENABLED",
$null,
"User"
)
[Environment]::SetEnvironmentVariable(
"CODEX_SPARKLE_ENABLED",
$null,
"Machine"
)
Remove-Item Env:\CODEX_SPARKLE_ENABLED -ErrorAction SilentlyContinue
# Remove the Store auto-update block.
$storePolicyPath =
"HKLM:\SOFTWARE\Policies\Microsoft\WindowsStore"
if (Test-Path $storePolicyPath) {
Remove-ItemProperty `
-Path $storePolicyPath `
-Name "AutoDownload" `
-ErrorAction SilentlyContinue
}
I then fully close/reopen the relevant Store/Codex processes and perform the update manually.
For Store-based installations, the product ID used in this issue is:
9PLM9XGG6VKS
A manual Store/winget update can therefore be initiated with:
winget upgrade `
--id 9PLM9XGG6VKS `
--source msstore `
--accept-source-agreements `
--accept-package-agreements
I still verify the registered result afterward:
Get-AppxPackage OpenAI.Codex |
Select-Object Name, Version, Status, PackageFullName, InstallLocation
I do not assume that a staged package directory means the new version is actually registered, because that exact Stage/Register split was one of the problems documented earlier in this thread.
5. Re-enable the blocks after the manual update
Once I have confirmed that the intended version is registered and Status: Ok, I reapply:
[Environment]::SetEnvironmentVariable(
"CODEX_SPARKLE_ENABLED",
"false",
"User"
)
$storePolicyPath =
"HKLM:\SOFTWARE\Policies\Microsoft\WindowsStore"
New-Item -Path $storePolicyPath -Force | Out-Null
New-ItemProperty `
-Path $storePolicyPath `
-Name "AutoDownload" `
-PropertyType DWord `
-Value 2 `
-Force | Out-Null
and verify both values again.
Why I am sharing this
This does not repair the updater. It simply converts an uncontrolled update path into a deliberate maintenance window:
normal use
-> automatic updates blocked
planned maintenance
-> save current policy/package state
-> temporarily unblock
-> update manually
-> verify registered package + Status: Ok
-> re-block automatic updates
For users repeatedly affected by #25770, this has been a much safer operational pattern than allowing background/in-app updates to occur at arbitrary times.
Again, I would not recommend destructive recovery steps such as resetting WindowsApps ACLs or deleting the packaged service based on this workaround. The earlier diagnostic evidence in this thread does not support those as a general fix.
If the updater is fixed so that Store/MSIX registration reliably completes and the app cleanly releases its package state, I would prefer to remove this workaround and return to normal automatic updates.
I can reproduce a related and severe consequence of this Windows MSIX update loop.
Observed package state:
- Installed user package:
OpenAI.Codex_26.818.5229.0 - Failed update target:
OpenAI.Codex_26.917.9434.0 - AppX deployment errors:
0x80073CF9with component error0x87AF000D - AppX event 471 also reports
0x12Cwhile deleting files from an older Codex package underC:\Program Files\WindowsApps\Deleted\...
The failed retries produce AppX diagnostic bundles in C:\Windows\Temp rather than cleaning them up:
- 7,129 files consuming 37.95 GB
- 512 repeated exports each of
System,Application,Microsoft-Windows-Store,AppXDeploymentServer,StateRepository, andAppReadinesslogs - The server system volume fell to 1.93 GB free of 111.16 GB
The AppxErrorReport metadata identifies OpenAI.Codex_26.917.9434.0 and records IsEvtExportLogPresent=1. This turns a failed updater retry into uncontrolled system-volume growth.
Expected behavior:
- Failed update retries must not repeatedly export multi-channel event logs into
C:\Windows\Temp. - Diagnostic bundles should be bounded, deduplicated, and cleaned after collection.
- The updater should back off or surface a clear actionable failure after repeated AppX failures.
- The old package/container state should be released before attempting the next MSIX deployment.
Adding an independent reproduction on Windows 10 (build 19045), using the Microsoft Store/MSIX OpenAI.Codex package.
The in-app Update button closes and reopens Codex, but the button remains and the registered package version does not advance. Windows had already staged the target package in both cases:
- 2026-09-25:
26.917.6896.0 -> 26.917.9434.0. AppXDeployment-Server event 638 said the affected Codex app was still running; events 419/404 reported0x80073D02and that the old package needed to be closed. - 2026-09-26:
26.924.1866.0 -> 26.924.2738.0. Event 638 again saidOpenAI.Codex_2p2nqsd0c76g0!Appwas still running; events 419/404 reported0x800700E9/0x80073CF9with the same “needs to be closed” reason.
On each day, an independent scheduled task fully stopped the old package's ChatGPT.exe processes, registered the already staged package by family name, and reopened the app. Verification then showed the new package with Status: Ok, the running executable under the new package path, and the app reporting up_to_date.
This establishes that registration was blocked while the old app was still in use. It does not establish why the app remained in use during the update/restart handoff.
P.S. Most of the bugs were rendering the codex unusable, but now we have few bugs killing the whole system, including this.
Additional Windows 11 reproduction (2026-09-28):
- Store/MSIX package on Windows 11 Enterprise, build 26100.
- Installed package:
OpenAI.Codex_26.917.9434.0; Store was applyingOpenAI.Codex_26.924.2738.0. - Microsoft Store repeatedly showed a retry/error state. At 09:35 (+08:00), AppXDeploymentServer reported Register failure
0x80073D02: the old package needed to be closed. Event 638 explicitly said the affected appOpenAI.Codex!Appwas still running. - Staging the target package succeeded; the user later reports the update completed successfully.
The user noticed Google Chrome was open during the retries and suspected it was related to ChatGPT remaining active. The Windows deployment events identify the running OpenAI.Codex app as the blocker, but do not identify Chrome as the process holding the package, so that connection is unconfirmed. It may be useful to investigate whether browser-related integrations can keep the desktop app active during Store servicing.
Additional reproduction on Windows 10 IoT Enterprise LTSC x64 (build 19044), 2026-09-28 (UTC+8).
The in-app Update flow closed the window, but after manually relaunching Codex the registered version was still 26.917.9434.0, while 26.924.2738.0 was staged.
- AppX Event 638 appeared three times and reported that
OpenAI.Codex_2p2nqsd0c76g0!Appwas still running. - Deployment events 401/404/419 recorded
0x80070005on the first attempt and0x8007001Fon the next two.
After a one-time repair stopped the remaining ChatGPT.exe processes and registered the package by family with -ForceTargetApplicationShutdown, the registered version became 26.924.2738.0 (Status: Ok) and launch from the new package was verified.
This is another reproduction of the update/registration handoff failure on Windows 10 build 19044. Please ensure the in-app updater completes registration after the app fully exits (or defers it until exit) and relaunches the updated package instead of leaving the previous version active.
Title: Repeated Windows Store update registration failures despite normal Quit completing
Related issue: https://github.com/openai/codex/issues/25770
The Microsoft Store/MSIX Codex app repeatedly downloads and stages an update successfully, but installing it fails. This recurred across several successive updates.
Latest failed update on 2026-09-30:
- Registered package before repair:
OpenAI.Codex_26.924.6891.0_x64__2p2nqsd0c76g0. - Staged target:
OpenAI.Codex_26.928.1915.0_x64__2p2nqsd0c76g0. - Three successive AppXDeploymentServer failures (events 404/419/638) report
0x80073CF9, inner0x800700E9, sayingOpenAI.Codex_2p2nqsd0c76g0!Appstill needs to close. - Codex's
windows-store-updaterlogs report a successful download/check withhasUpdate=true,canSilentlyDownload=true,completed=true.
Manual recovery, without uninstalling or modifying the signed application, succeeded: close the Codex process tree, register the already-staged target manifest from an independent elevated PowerShell process, and reopen using the registered app entry. Registration returned Status=Ok.
After recovery, a separate normal Quit test on the new package found zero Codex ChatGPT.exe processes. A diagnostic observer deliberately reopened the app several seconds later; this was not a spontaneous restart. No surviving process from that prior ChatGPT.exe tree was subsequently found. This test does not reproduce or prove the original update shutdown behavior.
The new package's app.asar and native/windows-updater.node block hashes match its AppxBlockMap. The packaged sandbox service is running with Automatic startup, and the Windows deployment/Store services are not disabled. No old-version Codex hive was found in the live hivelist after recovery. IPC write EPIPE warnings occurred during the successful normal Quit test as well, so they alone do not establish the update failure's cause.
Please investigate the Store install/shutdown coordination and whether registration begins while the current packaged application or its container is still considered active. A supported fix should preserve user settings and avoid requiring manual registration for successive releases.
Additional affected machine: repeated in-app update failure on 2026-09-30, with AppX registration diagnostics.
Environment
- Windows 10 Pro 22H2, build 19045.7725, x64; not domain joined.
- Windows desktop app executable: ChatGPT.exe; Store package family:
OpenAI.Codex_2p2nqsd0c76g0. - Running app version:
26.928.20755; registered MSIX:26.928.1915.0. - Already-staged target: MSIX
26.928.2636.0, containing app version26.928.21956.
User-visible reproduction and impact
- Click the in-app update button.
- The app displays the update/restart flow and exits.
- It does not reopen automatically.
- Launch it manually: the old version is still installed and the update button is offered again.
- Repeating the in-app update often repeats the same failure.
The affected user reports this has persisted for months and confirms that updating directly through Microsoft Store succeeds. The requested outcome is reliable in-app update and automatic relaunch on subsequent releases, rather than repeated manual Store recovery.
Evidence from this machine
The retained AppXDeployment-Server logs contain 12 Event 419 failures between 2026-08-30 and 2026-09-30 requiring OpenAI.Codex_2p2nqsd0c76g0!App to close. Earlier inner error codes vary; the two September 30 attempts at approximately 21:56 and 22:59 KST both failed with 0x800700E9, with outer deployment error 0x80073CF9.
Latest failure timeline, 2026-09-30, KST (UTC+09:00):
- 22:59:36.041: app log records
update_resume_state_saved. - 22:59:38.148: package Stage succeeds.
- 22:59:38.3815325: Event 603 starts
RegisterByPackageFamilyNamewithForceTargetApplicationShutdownOption. - 22:59:38.5073784: Event 9648 reports successful packaged sandbox-service termination.
- 22:59:38.5078728 / .5078866: Event 9643 reports
TerminateApplicationssuccess. - 22:59:38.5079284: Event 638 nevertheless reports the application is still running and the package cannot be updated.
- 22:59:38.5079354: Event 419 fails with
0x800700E9: the application needs to be closed. - 22:59:38.5087514: Event 605 identifies
StageUserDataProcessedas the last successful state;PackagesInUseClosedwas not reached. - 22:59:38.5522177: AppModel-Runtime Event 217 records deletion of the old desktop AppX container.
- Subsequent Register/deployment events fail. At 23:03, a manual launch still runs the old version and offers the update again.
This is a registration failure after successful download/staging, not just a missing relaunch after a successful installation. The ordering is consistent with a shutdown/registration coordination problem, but these logs alone do not prove the exact race or identify a particular remaining process/handle.
A read-only comparison of the installed and staged packages also found the Store updater JavaScript class and the native Windows updater's executable .text section unchanged between these versions. Other components differ, so this does not prove that the entire target release has identical behavior.
Please investigate a durable lifecycle fix that ensures package-use shutdown completes before registration proceeds and that successful registration leads to relaunch of the new version. A confirmed fixed build and repeat-update verification would be especially useful. No raw user paths, account identifiers, conversation contents, or proprietary source extracts are included here.
Additional reproduction on Windows 10 Pro 22H2 (build 19045, x64), using the in-app blue update button rather than a manual Store update.
User-visible behavior
- The app downloads an update and offers to apply it and restart.
- Clicking the button closes the Codex window. The user does not recall it reopening automatically.
- After the user launches Codex manually, the update button usually remains. The user's estimate is about 90% of attempts; this is a recollection, not a measured rate. Waiting and rebooting have not made the behavior reliable.
Sanitized Windows deployment evidence
- In the observed 2026-10-01 attempt, the registered MSIX was
26.928.2636.0and the staged target was26.928.3736.0. - AppXDeploymentServer reported Stage success, then Register failure about one second later. Events 419/401/404 reported inner error
0x800700E9/ outer error0x80073CF9: the affected Codex app still needed to close. - There was no recorded AppModel-Runtime
LaunchProcessfor Codex between that failure and the user's manual launch about 95 seconds later. At that manual launch, Register succeeded, the new package started, and the app then reportedup_to_date. - Over the preceding 30 days, the local AppXDeploymentServer log contains 23 Codex deployment-failure events (ID 404); all say the app needed to close. This counts deployment events, not user clicks or an independently measured failure rate.
The process observer used for this attempt stopped when Codex exited, so these records do not identify which process or handle kept the package in use. The close/registration ordering and missing automatic relaunch remain unproven at the implementation level.
Please investigate why the in-app update can reach Register while the old package is still in use, and why Codex does not reliably relaunch. If registration fails, the next launch should clearly show the failure instead of only offering the same update again.
Related: #24047 (no automatic relaunch) and #29172 (update indicator remains).
Privacy: this report includes only manually selected event types, error codes, relative timing, OS and package versions. No raw logs, screenshots, user or machine names, account details, file paths, SIDs, process IDs, or chat content are attached.
Additional reproduction on 2026-10-02, with sub-second Windows deployment timing.
Environment and observed behavior
- Windows 10 Pro 22H2, x64, build 19045.6456.
- Microsoft Store package family:
OpenAI.Codex_2p2nqsd0c76g0. - Failed update: registered/running 26.928.3736.0 → staged 26.930.2377.0.
Clicking the in-app update button closes the application, but it usually does not reopen automatically. Manually opening it after waiting starts the old version and shows the update button again. Restarting the PC allows the prepared update to register without another manual installation.
The local AppX log contains five registration-blocking Event 638 occurrences between September 30 and October 2, each reporting that Codex still needed to close. These are recorded deployment attempts, not a measured user-click failure rate.
Latest failure timeline
Times below are 2026-10-02, UTC+05:00. Event descriptions are English paraphrases of the local Windows messages.
| Time | Source / event | Observation |
|---|---|---|
| 11:48:57 | AppXDeploymentServer 400 | Stage of 26.930.2377.0 succeeded. |
| 11:53:59.7089005 | AppXDeploymentServer 603 | RegisterByPackageFamilyName started with ForceTargetApplicationShutdownOption and RegisterHighestVersion. |
| 11:53:59.8359003 | AppXDeploymentServer 9650 | Packaged sandbox service termination succeeded. |
| 11:53:59.8364341 / .8364524 | AppXDeploymentServer 9643 | Both TerminateApplications events reported success (0x0). |
| 11:53:59.8365497 | AppXDeploymentServer 638 | Registration blocked because OpenAI.Codex_2p2nqsd0c76g0!App was still considered running. |
| 11:53:59.8365602 | AppXDeploymentServer 419 | 0x800700E9: the application must be closed. |
| 11:53:59.8396305 | AppXDeploymentServer 605 | Last successful state: StageUserDataProcessed; next state PackagesInUseClosed was not reached. |
| 11:53:59.8428352 / .9056724 | AppModel-Runtime 217 | Two Desktop AppX containers for the old package were deleted, approximately 6 ms and 69 ms after Event 638. |
| 11:53:59.9605991 | AppXDeploymentServer 404 | Deployment failed: outer 0x80073CF9, underlying 0x800700E9. |
| 11:54:20 | AppModel-Runtime 201 | A subsequent launch still used 26.928.3736.0. |
| 11:56:12 | System 12 | Windows started after a PC restart. |
| 11:56:58 | AppXDeploymentServer 400 / 821 | Registration of 26.930.2377.0 succeeded at sign-in. |
The Store operation had AllowForcedAppRestart=1 and ended in an error state. The app log records update_resume_state_saved before the failed deployment, but does not identify the exact shutdown mechanism.
Scope and investigation request
The ordering is consistent with a shutdown/package-registration coordination race: the package-in-use check fails immediately after successful termination requests, while old-package containers disappear shortly afterward. It does not establish which process or handle caused the failure, or whether the defect belongs to Codex, Store, or AppX.
No Store/AppX policy prohibiting updates was found. The currently installed app archive and native updater match their package block-map hashes. No evidence attributing this failure to antivirus interference was found.
Please investigate waiting for package shutdown completion, recovery/retry after this registration failure, and reliable activation of the new package. The desired fix is reliable subsequent in-app updates and automatic relaunch, without repeated manual registration or PC restarts.
Only selected event types, timings, versions, and error codes are included. No raw logs, machine/user identifiers, conversation contents, or proprietary source excerpts are attached.
Additional reproduction on 2026-10-02: in-app update fails to register the prepared package and does not relaunch; updating directly through Microsoft Store subsequently succeeds.
Environment: Windows 10 Pro 22H2 x64,build 19045.4529. App-reported version before recovery: 26.928.31416,build 12553,channel prod. Registered/running MSIX before recovery: 26.928.3736.0. Target MSIX: 26.930.2377.0. Package family: OpenAI.Codex_2p2nqsd0c76g0.
Reproduction reported by the affected user: ①Use the in-app update action and allow the download to finish. ②Select the action that promises installation and automatic restart. ③The visible application closes but does not reopen automatically. ④Launch it manually: the old package still runs and the update is offered again. ⑤The user reports restarting Windows did not resolve the issue. They subsequently updated directly through Microsoft Store and confirmed success.
Read-only local verification confirmed the old package remained registered and running after failed attempts. After the direct Store update,both Get-AppxPackage and the running ChatGPT.exe path identified 26.930.2377.0,with package status Ok. No manual package registration,uninstallation,registry changes or process termination was performed by the diagnostic agent.
Selected failure timeline from Windows event logs. Times below are UTC on 2026-10-02; descriptions are English paraphrases of localised event messages. The app log records update_resume_state_saved at 12:18:55.925Z. Its preceding windows-store-updater check reports hasUpdate=true, completed=true, overallState=Completed,followed by download_completed with result=succeeded.
12:18:58.4406405Z AppXDeploymentServer 603
RegisterByPackageFamilyName starts with ForceTargetApplicationShutdownOption
and RegisterHighestVersion for OpenAI.Codex_2p2nqsd0c76g0.
12:18:58.5986811Z AppXDeploymentServer 9650
Packaged CodexSandboxService termination succeeds (0x0).
12:18:58.5992434Z / 12:18:58.5992950Z AppXDeploymentServer 9643
TerminateApplications reports success (0x0).
12:18:58.5994679Z AppXDeploymentServer 638
Registration blocked: OpenAI.Codex_2p2nqsd0c76g0!App is still running.
12:18:58.5995004Z AppXDeploymentServer 419
0x800700E9: the application must be closed.
12:18:58.6012490Z AppXDeploymentServer 605
Last successful state: StageUserDataProcessed.
Failed before PackagesInUseClosed, hr=0x800700E9.
12:18:58.6946268Z AppModel-Runtime 217
The old package's desktop AppX container is terminated.
12:18:58.7196746Z AppXDeploymentServer 404
Deployment fails: outer 0x80073CF9, underlying 0x800700E9.
The container-termination event occurs approximately 95 ms after the package-in-use rejection. Another failed registration at 12:35:00Z used ForceTargetApplicationShutdownOption and produced the same inner/outer errors. During the subsequent recovery period,registration succeeded at 12:38:02Z; the user confirmed the successful action was updating directly in Microsoft Store. Intermediate recovery attempts are not assigned to a particular UI action because they were not independently observed.
This establishes a registration failure after successful download/staging. The ordering is consistent with shutdown/registration coordination failing to wait for package quiescence. It does not establish the exact race,identify a remaining process/handle,or prove whether the defect is in Codex,Store or AppX. The currently updated build's next in-app update has not yet been tested.
Please investigate completion-aware shutdown before registration,retry/recovery when the package remains in use,and reliable activation of the updated package. On failure,the next launch should explain the deployment error rather than silently offering the same update again. Related update-loop report: #29172.
Only selected versions,event types,timings,error codes and package identifiers are included. No raw logs,user/machine identifiers,SIDs,account details,conversation contents or proprietary source extracts are attached.
Follow-up to my previous reproduction: a subsequent failed in-app update was successfully recovered without rebooting the PC on 2026-10-03.
Recurrence
The in-app update from 26.930.2377.0 → 26.930.3748.0 failed again. At 08:19:19 (UTC+05:00), AppX events 638/404 reported that Codex was still running, with underlying 0x800700E9 / outer 0x80073CF9. Stage succeeded, but manually reopening Codex still ran 26.930.2377.0 and showed the update indicator.
Verified recovery
With the user's authorization to interrupt Codex, an independent, one-time Windows scheduled task ran Windows PowerShell 5.1 outside the application process tree:
-
Requested closure of the old package's UI and waited 12 seconds.
-
Force-stopped the remaining
ChatGPT.exeprocesses whose executable paths matched the specific old Codex package, then waited another 5 seconds and verified that no matching UI processes remained. -
Registered the already-staged package by family:
Add-AppxPackage -RegisterByFamilyName -MainPackage 'OpenAI.Codex_2p2nqsd0c76g0' -ForceApplicationShutdown -
Verified that the registered version was 26.930.3748.0, with
Status=Ok. -
Launched the registered AUMID using
IApplicationActivationManager::ActivateApplication, then verified processes running from the new package directory. -
Removed the one-time task and its temporary script.
Selected recovery-log timestamps, UTC+05:00:
| Time | Result |
|---|---|
| 08:24:26 | Remaining old-package UI processes force-stopped. |
| 08:24:31.630 | Registration attempt 1 started. |
| 08:24:33.246 | New package registration verified. |
| 08:24:33.391 | Packaged activation returned. |
| 08:24:48.778 | New-version UI processes verified; recovery reported success. |
The OS last boot time remained 2026-10-02 11:56:12, confirming that this recovery did not reboot the PC. The user also confirmed that the update worked.
This is one verified recovery, not a durable fix or proof that subsequent in-app updates will work. It shows that the staged update can register and launch successfully once closure and registration are coordinated from an independent process. It supports investigating the in-app shutdown/registration/relaunch handoff, but does not identify a specific remaining process/handle or establish ownership of the defect.
No app reset, uninstall/reinstall, application-file patching, or permanent update automation was used. No raw logs, personal paths, machine/account identifiers, process IDs, or conversation contents are attached.
Windows 10 reproduction: the packaged sandbox service remained active after the GUI exited; a Store API retry with forced restart succeeded from non-elevated PowerShell.
Windows 10 Home 22H2 (19045), Microsoft Store install, 26.1016.8120.0 → 26.1016.8622.0. Times are local.
This adds a detailed timeline to the service-related observation in #46370, along with a recovery that succeeded without elevation on this machine.
1. Registration was still blocked 89 seconds after the GUI exited.
In the first attempt, no Codex ChatGPT.exe processes remained for approximately 89 seconds before registration began, but it still failed:
| Time | Event | Observation |
|---|---|---|
| 04:42:03.452 | AppModel-Runtime 217 | Last ChatGPT.exe container destroyed |
| 04:43:32.145 | AppXDeploymentServer 603 | RegisterByPackageFamilyName with RegisterHighestVersion,FailIfNeedsRemediation; no ForceTargetApplicationShutdownOption |
| 04:43:32.319 | AppXDeploymentServer 638 | “affected apps are still running: OpenAI.Codex_2p2nqsd0c76g0!App” |
| 04:43:32.333 | AppXDeploymentServer 419 | Registration failed with 0x80073D02 |
The remaining Desktop AppX container for the package, 2ded948a-…, held a single process: PID 3344, codex-windows-sandbox-service.exe (CodexSandboxService.OpenAI.Codex, Automatic startup). That container had persisted since the service started after the previous update.
The failed attempt was initiated through AppInstallManager.SearchForUpdatesAsync without AllowForcedAppRestart. In this test, closing the GUI and waiting was insufficient while the sandbox service remained active.
A subsequent retry with AllowForcedAppRestart = $true succeeded:
| Time | Event | Observation |
|---|---|---|
| 04:47:29.874 | AppXDeploymentServer 603 | Registration options now include ForceTargetApplicationShutdownOption |
| 04:47:29.941 | AppXDeploymentServer 9650 | CodexSandboxService terminated |
| 04:47:29.946 | AppModel-Runtime 217 | Container 2ded948a-…, associated with PID 3344, destroyed |
| 04:47:30.855 | AppXDeploymentServer 400 | Registration of 26.1016.8622.0 succeeded |
This sequence points to the remaining service container as the blocker in this attempt. It does not establish that every update failure in this thread has the same cause; other reports describe failures after service termination.
Please investigate whether the update handoff waits for all package-owned processes and containers, including the sandbox service, to stop before completing registration.
2. winget did not detect the pending update in this state.
While the in-app button’s item sat in the Store queue (ReadyToDownload, 95%, Working -> BlockedOnUser), both commands reported no upgrade:
winget list --id 9PLM9XGG6VKS --source msstore --upgrade-available
winget upgrade --source msstore --include-unknown
So the winget workaround suggested earlier in this thread had no update to act on in this state.
3. Workaround that succeeded without elevation on this machine.
#44601 reports that AppInstallItem.Restart() fails on the stuck item with E_FAIL. I didn't use it: a new SearchForUpdatesAsync request with forced restart queued the update again and completed.
Save your work and fully quit Codex first, including its tray icon (ChatGPT.exe in this installation). Run the following in a separate Windows PowerShell 5.1 window. The request permits forced shutdown of the package’s running processes.
Windows PowerShell 5.1 — successful recovery on this machine
# Save your work and fully quit Codex first, including its tray icon.
Add-Type -AssemblyName System.Runtime.WindowsRuntime
$null = [Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallManager, Windows.ApplicationModel.Store.Preview, ContentType = WindowsRuntime]
$asTask = [System.WindowsRuntimeSystemExtensions].GetMethods() | Where-Object {
$_.Name -eq 'AsTask' -and $_.GetParameters().Count -eq 1 -and
$_.GetParameters()[0].ParameterType.Name -eq 'IAsyncOperation`1'
} | Select-Object -First 1
$before = [version](Get-AppxPackage OpenAI.Codex).Version
$mgr = New-Object Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallManager
$opt = New-Object Windows.ApplicationModel.Store.Preview.InstallControl.AppUpdateOptions
$opt.AutomaticallyDownloadAndInstallUpdateIfFound = $true
$opt.AllowForcedAppRestart = $true
# In this run, registration used ForceTargetApplicationShutdownOption
# and Windows terminated CodexSandboxService.
$op = $mgr.SearchForUpdatesAsync('9PLM9XGG6VKS', '', '', '', $opt)
$task = $asTask.MakeGenericMethod(
[Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallItem]
).Invoke($null, @($op))
$null = $task.Wait()
$item = $task.Result
if ($item) {
do {
Start-Sleep 2
$state = "$($item.GetCurrentStatus().InstallState)"
} until (
$state -in 'Completed', 'Error', 'Canceled' -or
[version](Get-AppxPackage OpenAI.Codex).Version -gt $before
)
}
Get-AppxPackage OpenAI.Codex | Select-Object Version
The final registered version in my run was 26.1016.8622.0. The loop stops on an error or cancellation as well as completion, so check the resulting version rather than treating the script ending as proof of success. If the Store item remains stuck, the loop continues polling; Ctrl+C stops the script’s polling.
Related: #44601 (paused Store queue item and Restart() failure), #46370 (packaged sandbox service and update-registration failures).