openai / openai/codex

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

Open
#38,773 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

app bug windows-os
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 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!

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.