Codex Desktop flashes a console window when polling GitHub PRs via gh on Windows

Open 💬 1 comment Opened Aug 15, 2026 by user-sjn
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

Summary

On Windows, Codex Desktop periodically invokes the system-installed GitHub CLI (gh.exe) in the background to poll pull requests, and each invocation briefly flashes a black console window (a conhost.exe is created and immediately disappears). This is disruptive while working.

Environment

  • Windows 11 (build 22000), 64-bit
  • Codex Desktop 26.810.4967.0 (process name ChatGPT.exe, packaged under WindowsApps)
  • GitHub CLI installed at C:\Program Files\GitHub CLI\gh.exe
  • Codex also bundles its own gh at ~/.codex/tools/gh_2.96.0_windows_amd64/bin/gh.exe, but the app invokes the system-installed one

Repro

  1. gh auth login so GitHub is connected.
  2. Launch Codex Desktop and leave it running.
  3. Within a few minutes, a console window flashes. A process monitor shows:
  • gh.exe pr list --head master --author @me --state all --json number,url,state,headRefName --repo <repo>
  • Parent process: ChatGPT.exe (Codex Desktop)
  • Immediately followed by conhost.exe creation (the visible flashing window)

Expected behavior

Background gh invocations should never show a console window. Please launch them with CREATE_NO_WINDOW / hidden-window flags (or pipe output without allocating a console), and/or prefer the gh binary bundled with Codex so a separate system-wide install is not required.

Notes

The same class of issue affects other background console processes spawned by the app. For example, the CodexNotifyGuard scheduled task runs python.exe every 5 minutes with a visible console window; switching it to pythonw.exe (or hiding the window) fixes that one. Hiding console windows for background processes would avoid these flashes.

Thanks for looking into this!

View original on GitHub ↗

1 Comment

github-actions[bot] contributor · 12 days ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #38301
  • #37599

Powered by Codex Action