Windows Store app exits silently (code 0) when launched with no command-line arguments; launches fine with any argument

Open 💬 1 comment Opened Aug 8, 2026 by kerschensteinerd

## Summary

On a fresh install of the Codex/ChatGPT unified Windows app from the Microsoft Store, launching the app normally (Start-menu tile) causes the main ChatGPT.exe process to start, spawn its crashpad handler, and then exit cleanly (exit code 0) within ~2 seconds. No window ever appears, and there is no error dialog, no Event Log entry, no WER report, no crash dump, and no stdout/stderr output. From the user's perspective the app simply does nothing (on the first launch after install it appeared to open a tab in the default browser, then nothing on subsequent launches).

The same binary launches perfectly — window appears, signs in, fully functional — if it is started with any command-line switch, including a completely unknown/no-op one. The presence or absence of arguments is 100% correlated with success/failure across ~10 trials.

  • Launched with no args (Start tile / shell:AppsFolder\OpenAI.Codex_2p2nqsd0c76g0!App / direct ChatGPT.exe): 0 for 5 — always exits with code 0 in ~2 s
  • Launched via codex:// protocol activation: also exits silently
  • Launched with --enable-logging --v=1: works
  • Launched with --disable-features=NonexistentDummyFeature (a no-op): works (3 for 3 with any argument)

Note this is effectively a heisenbug for logging: --enable-logging itself makes the failure disappear, so no chrome_debug.log can be captured for a failing run. Capturing stdout/stderr of a failing no-arg run yields 0 bytes; cmd /c reports ERRORLEVEL 0.

Environment

  • App: OpenAI.Codex 26.803.5235.0 x64 (Microsoft Store, product 9PLM9XGG6VKS), fresh install
  • Chromium shell version per crashpad annotations: prod=Codex ver=151.0.7922.76
  • OS: Windows 11 Enterprise 10.0.22631 (23H2), enterprise-managed (domain policies present; Chrome enterprise policies force-install extensions, which the app's Chromium shell also picks up)
  • Display: single monitor, 2560x1440, scale factor 1 (so not the known off-screen/DPI window bug)
  • Default browser: Google Chrome
  • The legacy OpenAI.ChatGPT-Desktop ("ChatGPT Classic") Store app is also installed

Steps to reproduce

  1. Install the app from the Microsoft Store (winget install --id 9PLM9XGG6VKS -s msstore).
  2. Launch it from the Start menu (or explorer shell:AppsFolder\OpenAI.Codex_2p2nqsd0c76g0!App).
  3. Observe: ChatGPT.exe and its --type=crashpad-handler child appear in Task Manager for ~2 seconds, then exit. No window. Exit code 0.
  4. Now launch the same exe with any argument, e.g.:

``powershell
Invoke-CommandInDesktopPackage -PackageFamilyName "OpenAI.Codex_2p2nqsd0c76g0" -AppId "App"

-Command "C:\Program Files\WindowsApps\OpenAI.Codex_26.803.5235.0_x64__2p2nqsd0c76g0\app\ChatGPT.exe"
-Args "--disable-features=NonexistentDummyFeature"
``

  1. Observe: app launches fully and works (12 processes, visible window, loads chatgpt.com, authenticated session works).

Diagnostics already ruled out

  • Not a crash: no WER reports, no Event Log entries, no Crashpad dumps (Crashpad\reports empty), exit code 0 — it is a deliberate clean exit on the no-arg code path.
  • Not the legacy ChatGPT Classic app interfering: killing all ChatGPT Classic.exe processes before a no-arg launch makes no difference.
  • Not stale profile state: fresh install; no pre-existing %APPDATA%\Codex; the redirected LocalCache\Roaming\Codex was created new at first launch. (A ~/.codex directory from prior Codex CLI/app usage does exist.)
  • Not the off-screen/no-window bug (bswen writeup): in the failing case the process fully exits; in the working case the window is created on-screen and visible.
  • Window enumeration in the working case shows the visible main window (Chrome_WidgetWin_1, title "ChatGPT") plus a hidden "Codex" window — all normal.

Possibly related observation from a working (logged) run

The Electron/owl renderer logs this on startup:

ERROR:owl\browser\api\electron_api_web_contents.cc] Electron renderer console [warning]
app://-/assets/app-initial-*.js Matched leaf route at location "/" does not have an element or
Component. This means it will render an <Outlet /> with a null value by default resulting in an
"empty" page.

If the no-arg startup path decides visibility/exit based on whether initial content rendered, an empty route at / could explain a "nothing to show → exit 0" outcome, while any CLI switch may route startup through a different branch. Speculative — included only as a lead.

Workaround

A shortcut that launches app\ChatGPT.exe inside the package context (Invoke-CommandInDesktopPackage) with a dummy switch makes the app fully usable.

Expected behavior

Launching the app from the Start menu (no arguments) should open the app window.

View original on GitHub ↗

1 Comment

bongona · 19 days ago

Independent Windows 11 confirmation with correlated forensic evidence

I can reproduce this on:

  • Windows 11 Home x64, build 26200
  • Package: OpenAI.Codex_26.803.5235.0_x64__2p2nqsd0c76g0
  • ChatGPT.exe file version: 151.0.7922.76

Reproduction

  1. Fully exit the desktop app.
  2. Launch Codex normally from the Start menu / packaged application without supplying an application argument.
  3. The ChatGPT.exe process appears briefly, exits cleanly, and can open a blank Chrome tab. No Codex window appears.
  4. Launch the installed executable with an inert argument:

``powershell
$pkg = Get-AppxPackage OpenAI.Codex
$exe = Join-Path $pkg.InstallLocation 'app\ChatGPT.exe'
Start-Process $exe -ArgumentList '--disable-features=NonexistentDummyFeature'
``

  1. The desktop app initializes normally.

Correlated local evidence

  • AppModel recorded 26 failed ordinary activations. Each desktop container existed for only 0.051-0.280 seconds (mean 0.085 seconds).
  • There were zero Codex app-server database log records during the failed-launch window, and no desktop log was created. This places the exit before normal Codex runtime/state handling.
  • With the dummy argument, the container remained alive, desktop logging began with Launching app, the app-server was spawned, the main frame became ready, and normal logging resumed.
  • AppX repair validated 5,473 package files successfully, but the next launch still failed.
  • Removing and reinstalling the Store package installed the same 26.803.5235.0 build; the installer-triggered launch failed again in 0.093 seconds.
  • Six copied Codex SQLite databases passed PRAGMA integrity_check with ok. SQLite WAL/SHM files were preserved with the databases.
  • The global-state JSON and its backup were valid and hash-identical. A config.toml disable test did not change the behavior.
  • Package, local-runtime, and sandbox copies of codex.exe were SHA-256 identical.
  • No ChatGPT/Codex Application Error, WER, Reliability Monitor crash, or Crashpad report was present.

Timing detail

The machine updated from package 26.730.8199.0 to 26.803.5235.0 on August 8. The new package then ran successfully for two long sessions, including one lasting until shortly before system sleep at 00:23. After resume on August 9, ordinary activation began failing. No package update, runtime migration, or plugin refresh occurred around the last healthy session's 00:22 state write.

Current assessment

The failed and successful paths diverge in the desktop main process before the Codex app-server starts. The behavior appears sensitive to argument presence and/or the distinction between packaged activation and direct executable launch. The exact predicate remains unknown because those two variables have not yet been isolated in an externally traced cold-start A/B.

I have a timestamped, SHA-256-sealed evidence set containing exported AppX/AppModel/Shell/WER/PowerShell event logs, package metadata, process command lines from the successful case, copied SQLite/WAL/SHM files, and a privacy-scrubbed incident timeline. I can provide a smaller sanitized subset or run a Procmon/WPR A/B if maintainers specify the most useful capture.