Codex Windows PowerShell Console Flash

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

What version of the Codex App are you using (From “About Codex” dialog)?

26.727.6591.0

What subscription do you have?

Pro 20x

What platform is your computer?

Microsoft Windows NT 10.0.19045.0 x64

What issue are you seeing?

Bug Report: Codex Windows PowerShell Console Flash

Title

Windows Codex app briefly flashes a PowerShell console when respawning its AST safety parser

Environment

  • Windows desktop Codex/ChatGPT app
  • Codex app version: 26.727.6591.0
  • Windows PowerShell 5.1
  • Codex executable: C:\Program Files\WindowsApps\OpenAI.Codex_26.727.6591.0_x64__2p2nqsd0c76g0\app\resources\codex.exe

Problem

The Codex app periodically launches or respawns a PowerShell AST parser. A PowerShell console window visibly flashes over the desktop during process creation.

The parser is not an interactive terminal. It is a long-lived child process that reads newline-delimited JSON requests from stdin and writes JSON responses to stdout.

Reproduction

  1. Open the Windows Codex desktop app.
  2. Use a task that invokes PowerShell through Codex.
  3. Observe the desktop while the Codex PowerShell safety worker starts or is respawned.
  4. A PowerShell console briefly appears over the active desktop window.

Verified evidence

  • The parser runs as a child of codex.exe.
  • Its command line includes -NoLogo -NoProfile -NonInteractive -EncodedCommand.
  • The decoded worker identifies itself as a long-lived PowerShell AST parser.
  • It uses a persistent stdin/stdout JSON protocol.
  • Stopping the worker causes Codex to recreate it, confirming that the worker is intentionally supervised.
  • After startup, the worker has MainWindowHandle = 0 and no window title. The visible flash occurs during process creation, before the process is fully attached to its redirected streams.
  • A separate Oracle Bridge process was observed and excluded from the cause.

Expected behavior

The PowerShell worker should never create a visible console window, including during startup or respawn.

Suggested implementation fix

Create the PowerShell child with hidden/no-console flags from the initial CreateProcess call, rather than hiding it after startup. The launcher should use the equivalent of:

  • CREATE_NO_WINDOW
  • STARTF_USESHOWWINDOW
  • SW_HIDE
  • redirected stdin/stdout/stderr handles

Adding -WindowStyle Hidden after process creation may not prevent the initial console flash.

Impact

The flash interrupts active desktop work and makes the Codex app appear to launch unwanted PowerShell windows. Killing the worker is not a valid workaround because Codex immediately respawns it and may temporarily lose PowerShell command-safety validation.

Requested resolution

Please ensure all Windows PowerShell safety-parser variants are created without an attached visible console from the first process-creation call, including automatic respawn paths.

Privacy note

No project source, credentials, tokens, or private message contents are included in this report.

What steps can reproduce the bug?

Feedback ID: 019ec25e-d6cc-7af3-92f5-54559b0eae35

What is the expected behavior?

_No response_

Additional information

_No response_

View original on GitHub ↗

2 Comments

github-actions[bot] contributor · 26 days ago

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

  • #35827

Powered by Codex Action

kivikdigitalgroup · 21 days ago

Confirmation / forensic update (2026-08-06)

Still reproducing on current Windows ChatGPT/Codex desktop app-server.

Environment

  • Package: OpenAI.Codex Microsoft Store / WindowsApps
  • Identity version: 26.730.7989.0
  • Binary: C:\Program Files\WindowsApps\OpenAI.Codex_...\app\resources\codex.exe
  • Host: Windows 10 (build 19045-class), x64
  • Also present: npm @openai/codex 0.146.0 vendor codex.exe (same AST payload string; also lacks CREATE_NO_WINDOW string)

Process tree (live)

codex.exe  -c features.code_mode_host=true app-server --analytics-default-enabled
  └── powershell.exe -NoLogo -NoProfile -NonInteractive -EncodedCommand <...>

Decoded payload header (exact):

# Long-lived PowerShell AST parser used by the Rust command-safety layer on Windows.
# The caller starts one child process per PowerShell executable variant and then sends
# newline-delimited JSON requests over stdin:

Binary inspection

Scanned installed codex.exe (Store 26.730.7989.0, ~347 MB):

  • Contains: Long-lived PowerShell AST parser..., command-safety, powershell.exe, -WindowStyle / Hidden (appears only in agent guidance text, not as process spawn flags)
  • Does NOT contain: CREATE_NO_WINDOW, SW_HIDE, STARTF_USESHOWWINDOW, CREATE_NEW_CONSOLE string markers

So the child is still being spawned without Win32 no-window creation flags. -WindowStyle Hidden is not applied to this long-lived AST helper (or is insufficient alone when the parent is a console-capable process).

Symptom for users

Visible PowerShell console open/close flashes while Codex app-server is running in the background — even when the user is typing in a different app (e.g. Hermes CLI). It is easy to mis-attribute to keystrokes; the correlation is Codex tool/command-safety activity / helper lifetime, not the other app's input.

Requested fix

Spawn the AST helper with:

  • CREATE_NO_WINDOW (0x08000000), and/or
  • STARTF_USESHOWWINDOW + SW_HIDE, and/or
  • powershell.exe -WindowStyle Hidden on the argv

plus keep stdin/stdout redirected as today. Do not disable command-safety — only hide the console host.

Happy to retest a preview build against 26.730.7989.0.