Codex Desktop flashes a console window when polling GitHub PRs via gh on Windows
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.5k
- PR merge metrics
- PR metrics pending
Description
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 nameChatGPT.exe, packaged under WindowsApps) - GitHub CLI installed at
C:\Program Files\GitHub CLI\gh.exe - Codex also bundles its own
ghat~/.codex/tools/gh_2.96.0_windows_amd64/bin/gh.exe, but the app invokes the system-installed one
Repro
gh auth loginso GitHub is connected.- Launch Codex Desktop and leave it running.
- 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.execreation (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!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the background GitHub PR polling entry point that invokes gh.exe on Windows and inspect how that child process is created. Reproduce the polling flow on Windows, then verify that pull-request data is still returned without a visible console window; also check the related background console-process behavior described in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github, rust
- Domain
- cli, desktop, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100