Codex Windows PowerShell Console Flash
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
- Open the Windows Codex desktop app.
- Use a task that invokes PowerShell through Codex.
- Observe the desktop while the Codex PowerShell safety worker starts or is respawned.
- 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 = 0and 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_WINDOWSTARTF_USESHOWWINDOWSW_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_
2 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
Confirmation / forensic update (2026-08-06)
Still reproducing on current Windows ChatGPT/Codex desktop app-server.
Environment
OpenAI.CodexMicrosoft Store / WindowsAppsC:\Program Files\WindowsApps\OpenAI.Codex_...\app\resources\codex.exe@openai/codex0.146.0 vendorcodex.exe(same AST payload string; also lacksCREATE_NO_WINDOWstring)Process tree (live)
Decoded payload header (exact):
Binary inspection
Scanned installed
codex.exe(Store 26.730.7989.0, ~347 MB):Long-lived PowerShell AST parser...,command-safety,powershell.exe,-WindowStyle/Hidden(appears only in agent guidance text, not as process spawn flags)CREATE_NO_WINDOW,SW_HIDE,STARTF_USESHOWWINDOW,CREATE_NEW_CONSOLEstring markersSo the child is still being spawned without Win32 no-window creation flags.
-WindowStyle Hiddenis 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/orSTARTF_USESHOWWINDOW+SW_HIDE, and/orpowershell.exe -WindowStyle Hiddenon the argvplus 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.