openai / openai/codex

Windows: Codex auto-update causes first launch to run in background with no window (MainWindowHandle=0)

Open
#41,523 9 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

app bug performance windows-os
Dominant language
Rust
Stars
125k
Forks
19.4k
PR merge metrics
PR metrics pending

Description

Environment
  • OS: Windows
  • Codex/ChatGPT desktop package: OpenAI.Codex_26.825.5331.0_x64
  • Codex CLI: 0.149.1
Problem

After Codex automatically downloaded and installed an update, clicking the Codex icon did not show any window.

Task Manager showed multiple ChatGPT/Codex processes running in the background.

PowerShell confirmed that all ChatGPT processes initially had:

MainWindowHandle = 0

The Codex CLI itself was working normally:

codex --version
codex-cli 0.149.1

CODEX_CLI_PATH was also valid and Test-Path returned True.

Observed behavior
  1. Codex automatically downloaded an update while the app was being used.
  2. After the update, clicking the Codex icon produced no visible window.
  3. Task Manager showed approximately 6 ChatGPT/Codex processes.
  4. Get-Process showed MainWindowHandle=0.
  5. Leaving the processes running for several minutes eventually caused the Codex window to appear.
  6. After the window finally appeared, subsequent launches became normal.
  7. A controlled restart test showed the window being created successfully within approximately 10 seconds.

Example controlled test result:

10 sec | Process count: 8 | WindowHandle: 0, 0, 0, 0, 0, 1247092, 0, 0
Window created successfully, total time: 10 sec
Expected behavior

After an automatic update, Codex should open normally when clicking the application icon.

If post-update initialization or migration is required, the app should show a splash/loading/update screen rather than silently running multiple background processes with no visible window.

Additional notes

This appears to be related specifically to the first launch after an automatic desktop app update.

After waiting for the first launch to eventually complete, subsequent launches work normally.

No reinstall, cache deletion, or CLI repair was required.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the first launch after an automatic desktop update on Windows, using the reported package version and PowerShell checks for process count and MainWindowHandle. Trace the post-update initialization path and compare it with the controlled restart that creates a window within about 10 seconds. Done means the first post-update click reliably shows a window or visible loading state instead of multiple background processes.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
desktop, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.