[Windows] Store app self-uninstalls (~60s after launch) - package removed in user context, disappears from Installed Apps

Open 💬 1 comment Opened Jul 25, 2026 by makeenology

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 ID 9PLM9XGG6VKS)
  • 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

  1. Install Codex from the Microsoft Store (completes without error).
  2. Click Open. Window appears for ~1 second.
  3. Window closes. ~60s later the package is gone from Installed apps; Store shows Install again.
  4. 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.

View original on GitHub ↗

1 Comment

makeenology · 1 month ago

Update: same package now in Modified, NeedsRemediation state — launches, but exits when opening a chat

Follow-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

  • App launched normally at 11:18:25 (AppModel-Runtime/Admin Id 201 — process created, container created).
  • It ran ~4 minutes and fully initialized its backend: wrote ~/.codex/config.toml, materialized bundled plugins (browser/chrome/visualize), grew ~/.codex/logs_2.sqlite to ~111 MB.
  • When I opened a chat, the app exited gracefully — state flushed to .codex-global-state.json, then AppModel-Runtime/Admin Id 217 "Destroyed Desktop AppX container" at 11:22:40.
  • No crash: zero WER events (1000/1001/1002), no AppModel-Runtime faults, no crash dump. Clean shutdown, not a fault.
  • Not uninstalled this time: no Remove operations in AppXDeploymentServer/Operational.

The key finding — the package is corrupted

Get-AppxPackage -Name OpenAI.Codex | Format-List Name,Status,SignatureKind,InstallLocation
# Name            : OpenAI.Codex
# Status          : Modified, NeedsRemediation
# SignatureKind   : Store
# InstallLocation : C:\Program Files\WindowsApps\OpenAI.Codex_26.721.4979.0_x64__2p2nqsd0c76g0

The InstallLocation, AppxManifest.xml, and app\resources are all present and Store-signed, yet the package is flagged Modified, NeedsRemediation. Re-registering the on-disk manifest completes successfully but does not clear the flag:

Add-AppxPackage -DisableDevelopmentMode -Register "C:\Program Files\WindowsApps\OpenAI.Codex_26.721.4979.0_x64__2p2nqsd0c76g0\AppxManifest.xml"
# succeeds, but Status stays "Modified, NeedsRemediation"

So the on-disk payload genuinely diverges from the signed manifest — not a stale flag.

Likely root cause (ties both failure modes together)
Modified, NeedsRemediation is the signature of an app writing into its own Program 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:

  • the earlier self-uninstall loop (deployment remediation churn ending in a per-user Remove), and
  • this graceful exit when the chat backend spins up on a package Windows considers unhealthy.

An 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 calling RemovePackage) if useful.