[Windows] Store app self-uninstalls (~60s after launch) - package removed in user context, disappears from Installed Apps
Summary
On Windows 11, the Microsoft Store Codex app installs fine, launches (window shows ~1s), then is uninstalled from my account ~60 seconds later. It vanishes from Settings → Installed apps and the Store button flips back to "Install". Reinstalling loops the same behavior.
This is not a crash: there are no Windows Error Reporting (WER) or AppModel-Runtime fault events. The AppX deployment log shows a clean Remove operation running under my user SID (not SYSTEM) — i.e. the package is being deliberately deprovisioned per-user, not exiting/crashing. It's a regression: the same MSIX GUI ran fine on this machine for ~6 weeks (per the app's own native-host log) until build 26.721.x.
Environment
- OS: Windows 11 Home 25H2, build 26200.8894, x64 (AMD64)
- Store app:
OpenAI.Codex_26.721.4979.0_x64__2p2nqsd0c76g0(Store ID9PLM9XGG6VKS) - Codex CLI (still works):
codex-cli 0.146.0-alpha.3.1 - Dependencies all present/OK: WindowsAppRuntime 1.1/1.6/1.8/2.x, VCLibs 140, .NET Native, UI.Xaml 2.7/2.8
Steps to reproduce
- Install Codex from the Microsoft Store (completes without error).
- Click Open. Window appears for ~1 second.
- Window closes. ~60s later the package is gone from Installed apps; Store shows Install again.
- Repeats every cycle.
Evidence
1. Not a crash. Application log WER (Event IDs 1000/1001/1002) and Microsoft-Windows-AppModel-Runtime/Admin contain zero Codex events.
**2. Package removed by a user-context uninstall, tied to launch.** From Microsoft-Windows-AppXDeploymentServer/Operational:
Register … finished successfully (install completes)
Started deployment Remove operation … user SID S-1-5-21-…-1001 (~60s after launch)
Remove … finished successfully
Stage runs as SYSTEM (S-1-5-18), but Remove runs as the logged-in user — a per-user uninstall, not a Windows/servicing action. Windows does not auto-uninstall a package for crashing.
3. Only benign deployment errors (neither removes a package): 0x80073CF2 (StageUserData on an already-installed package) and 0x80070015 ("pre-launch service not ready").
4. Regression. The app's own %LOCALAPPDATA%\OpenAI\Codex\chrome-native-hosts-v2.json shows the GUI launching successfully across ~15 builds (26.608 → 26.715) from mid-June through 24 Jul 2026; the self-uninstall loop appears with 26.721.4979.0.
Diagnostic command (repro for others)
Get-WinEvent -LogName 'Microsoft-Windows-AppXDeploymentServer/Operational' -MaxEvents 500 |
Where-Object { $_.Message -match 'codex' -and $_.LevelDisplayName -ne 'Verbose' } |
Sort-Object TimeCreated |
Format-Table @{n='Time';e={$_.TimeCreated.ToString('HH:mm:ss')}}, Id,
@{n='Msg';e={($_.Message -split "`r?`n")[0]}} -AutoSize -Wrap
Note the SID on each Remove operation is the interactive user, not S-1-5-18.
Impact / workaround
Desktop GUI is unusable (Store-only; no standalone installer exists). The bundled CLI (~\AppData\Local\OpenAI\Codex\bin\...\codex.exe) still works as a workaround.
Possibly related
#34277, #24047, #33321, #28035, #27858, #14087 — several describe "silent exit after launch"; this report adds that the package is actually deprovisioned (not just the process exiting).
The exact process that calls RemovePackage wasn't captured; I can attach a Process Monitor trace of one install→launch→removal cycle on request.
1 Comment
Update: same package now in
Modified, NeedsRemediationstate — launches, but exits when opening a chatFollow-up on the same machine (Windows 11 Home 25H2, build 26200.8894, x64), same package
OpenAI.Codex_26.721.4979.0_x64__2p2nqsd0c76g0. A later launch behaved differently from the self-uninstall loop, and I think it points at a common root cause.What happened this time
AppModel-Runtime/AdminId 201 — process created, container created).~/.codex/config.toml, materialized bundled plugins (browser/chrome/visualize), grew~/.codex/logs_2.sqliteto ~111 MB..codex-global-state.json, thenAppModel-Runtime/AdminId 217 "Destroyed Desktop AppX container" at 11:22:40.AppModel-Runtimefaults, no crash dump. Clean shutdown, not a fault.Removeoperations inAppXDeploymentServer/Operational.The key finding — the package is corrupted
The InstallLocation,
AppxManifest.xml, andapp\resourcesare all present and Store-signed, yet the package is flaggedModified, NeedsRemediation. Re-registering the on-disk manifest completes successfully but does not clear the flag:So the on-disk payload genuinely diverges from the signed manifest — not a stale flag.
Likely root cause (ties both failure modes together)
Modified, NeedsRemediationis the signature of an app writing into its ownProgram Files\WindowsApps\<package>payload (e.g. during self-update). Once the package is in that state, Windows repeatedly tries to remediate/re-deploy it, which plausibly drives both symptoms reported here:Remove), andAn MSIX package should be treated as immutable; self-update should target a writable location (
%LOCALAPPDATA%), not the signed install dir. Worth checking whether the updater/migration path writes into the install location.Happy to attach a Process Monitor trace (file writes under
WindowsApps\OpenAI.Codex*+ the process callingRemovePackage) if useful.