[Bug] Windows desktop flashes visible PowerShell window during background command monitoring
Codex app version
26.715.2305.0 (Microsoft Store; no newer update currently offered)
Platform
- Microsoft Windows 11 Home
- Version 10.0.26200, build 26200
- ARM64
What issue are you seeing?
While Codex Desktop is open and agents are performing background work, a visible PowerShell console window repeatedly appears and disappears. This can happen every few minutes during active multi-threaded/background agent work and interrupts normal desktop use.
Process inspection during an occurrence showed:
powershell.exelaunched with-NoProfile -NonInteractive -Command ...- Parent process:
ChatGPT.exe - A corresponding
conhost.exewas created for the PowerShell process - The PowerShell command appears to collect process/CPU information using
Win32_PerfFormattedData_PerfProc_Process
The full command body is intentionally omitted because it contains verbose local process details, but I can provide a redacted copy if useful.
This is not an Armatus/project scheduled task: the relevant Windows Task Scheduler job already uses -WindowStyle Hidden. A separate long-lived Codex PowerShell command-safety helper had no window handle. Codex's process registry showed 200 historical records but zero commands with a live OS PID, so no orphaned background command was present.
Steps to reproduce
- Open Codex Desktop on Windows.
- Run persistent/background agent tasks that execute local commands.
- Continue using the desktop while those tasks run.
- Observe a PowerShell window briefly appear and disappear periodically.
The frequency increases during active background-agent command execution. The issue began becoming obvious after configuring multiple persistent role tasks, but it is the Codex Desktop process—not the project scripts—that launches the visible PowerShell process.
Expected behavior
All noninteractive PowerShell processes used for command execution or process monitoring should launch without a visible console window (for example using the appropriate Windows no-window creation flag). Background agent work should not flash or focus a console window.
Actual behavior
ChatGPT.exe launches a short-lived PowerShell process with a console host, producing a visible window that repeatedly flashes on screen.
Related issue
Possibly related to #17208, which reports Codex launching an encoded, noninteractive PowerShell process behind ordinary commands on Windows. This report is specifically about the resulting visible recurring console window in Codex Desktop.
2 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
I can confirm that this issue still occurs on a newer Windows x64 build.
Environment
26.721.3404.026.715.10079.010.0.26200The visible PowerShell windows became noticeable after the Codex Desktop update.
Observed behavior
While Codex is executing local tasks, multiple short-lived PowerShell console windows appear and disappear. The frequency increases when the task performs several local tool or shell calls.
A live process-tree inspection showed two distinct paths:
The second
powershell.exewas launched non-interactively and contained process/CPU inspection commands involving:This matches the WMI sampling behavior discussed in #33875.
I also performed a read-only inspection of the installed
resources/app.asar. The Windows child-process sampler appears to request:Despite that, Windows still creates a corresponding
conhost.exe, and a console window can visibly flash before the short-lived process exits.Configuration checks
I found no local configuration that would intentionally enable console windows:
unified_exec,shell_tool, orshell_snapshotoverride in the user Codex configuration.ChatGPT.exe, not a scheduled task or project script.Steps to reproduce
ChatGPT.exe → powershell.exe → conhost.exechain.Expected behavior
All noninteractive PowerShell processes used for background process monitoring should run without creating or focusing a visible console window.
Actual behavior
Short-lived PowerShell/conhost windows repeatedly flash while Codex is working, interrupting normal desktop use.
Questions for the maintainers
Could someone from OpenAI confirm whether this behavior is currently triaged or tracked internally?
In particular:
I can collect an additional sanitized process-lifecycle trace if the team specifies the preferred Windows providers and fields.