Repository navigation
Description
Summary
Codex Desktop on Windows repeatedly spawns short-lived internal console child processes. Each spawn allocates a visible console window that flashes on screen and disrupts typing/window focus.
This occurs while the app is running in the background, including when it is fully idle with no chat/task session open.
Environment
- Codex desktop app:
26.715.31925(also observed on26.715.31251) - codex-cli:
0.144.5 - OS: Windows 11 Home
10.0.26200 - Workspace: large local Git repository
- Evidence captured: 2026-07-20 (Asia/Tokyo), via
Win32_Processpolling
Observed behavior
A 90-second process-creation trace captured approximately 110 process spawns originating from ChatGPT.exe:
- 38 ×
taskkill.exe /pid <pid> /t /f - 21 ×
git.exe, including commands such as:git config --null --get core.fsmonitorgit -c core.hooksPath=NUL -c core.fsmonitor= hash-object -- <file>
- Approximately 55 ×
conhost.exechildren associated with those console processes
The git hash-object calls appear to be per-file change probing, so activity in a busy repository—or another tool writing files in the workspace—multiplies the flash frequency. Several black console windows can pop up per minute and disappear within a fraction of a second.
The taskkill /t /f volume also suggests process-tree cleanup is being performed through a console helper rather than a windowless Win32 process/job-object path.
Steps to reproduce
- Open Codex Desktop on Windows with a medium-sized or larger local Git repository.
- Leave the app running; no active chat/task session is required.
- Observe process creation using
Win32_ProcessStartTrace,Win32_Processpolling, Process Monitor, or Process Explorer. - Observe recurring chains originating from the desktop app:
ChatGPT.exe -> git.exe -> conhost.exeChatGPT.exe -> taskkill.exe -> conhost.exe
- Observe visible black console-window flashes and occasional typing/window-focus disruption.
Expected behavior
Internal housekeeping children such as Git probes and process-tree cleanup should be spawned without visible console windows, for example:
- Win32
CREATE_NO_WINDOW(0x08000000) inCreateProcesscreation flags, or - Electron/Node child-process options such as
windowsHide: true, with no console inheritance.
Process-tree cleanup should also avoid repeated visible taskkill /t /f helper launches where practical (for example, using TerminateProcess and/or Windows job objects).
Impact
- Repeated visible black-window flashes
- Disrupted typing and window focus
- Frequency increases with repository activity and repository size
- Reproduces even when Codex is idle in the background with no task open
Related issue
Possibly related to #17229, which reports repeated git.exe/conhost.exe spawning and orphaned processes. This report specifically adds Win32 process-trace evidence for visible console allocation, frequent taskkill.exe child processes, per-file hash-object probing, focus disruption, and idle-background reproduction.
Activity
github-actions commentedon Jul 20, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
suiyuebaobao commentedon Jul 22, 2026
The internal Git/taskkill child-process churn and visible console flashes here are part of the same Git-backed desktop integration surface that this workaround disables.
I published a single-file Windows launcher for the original Microsoft Store/MSIX Codex app:
It starts Codex with a process-scoped
GIT_DIR=NUL. On my machine, the stable trace changed from 247 newgit.exeand 137 newtaskkill.exeprocesses per 10 seconds to 0 and 0 over 15 seconds; WMI Provider Host fell from about 6.6% to 0.9%.Usage: fully exit Codex from the Windows system tray, then run the script.
This is an unofficial workaround, not an upstream fix. It deliberately disables or limits Review, Changes, branch detection, commit, and other Git-backed Codex features. It does not patch Codex, modify repositories or Git configuration, write system environment variables, require elevation, terminate processes, or remove chat history. Launching Codex normally restores Git integration.
tomiibestpartner-sketch commentedon Jul 25, 2026
I can reproduce the same user-visible symptom on Windows Codex desktop 26.721.4979.0. In my case, the internal child is PowerShell rather than git/taskkill:
ChatGPT.exe -> codex.exe -> powershell.exeThe observed non-interactive PowerShell process collects CPU/memory information through
Win32_PerfFormattedData_PerfProc_Processand does not include-WindowStyle Hidden. Its visible console window briefly takes foreground focus and interrupts voice dictation.This supports the same root issue: all internal Windows console children should be created windowless from process creation, including PowerShell-based resource collection. Closing #35301 as a duplicate so the PowerShell-specific evidence is consolidated here.
71ming commentedon Sep 23, 2026
I can reproduce this issue on Codex Desktop for Windows version
26.915.4065.0.While Codex is open and working with a local Git repository, visible console windows periodically flash and disappear.
I monitored process creation and confirmed these process chains:
Examples of commands launched directly by
ChatGPT.exeinclude:The flashing occurs during normal background Git status/remote refreshes, sometimes while no Git command was explicitly requested. Closing Codex stops the behavior.
This began after repository ownership was repaired, which allowed Codex Git integration to work normally again. The repository permissions are now correct, so reverting the ownership change is not a safe workaround.
Expected behavior: background Git processes should be launched with
CREATE_NO_WINDOWor equivalent hidden-window flags.brick0808 commentedon Oct 2, 2026
Comment for #34266
Adds: regression on
26.930.2377.0+ source-level root causeI hit the exact same behavior described here, and I was able to narrow it down to a
specific line in
app.asar. Posting here rather than opening a duplicate.This is a regression on the latest Store build
OpenAI.Codex26.930.2377.0, installed 2026-10-02 14:07 local10.0.26220The flashing did not occur on the previously installed build on this machine. I no
longer have the previous build to diff against, so I can't prove what changed — but the
symptom started exactly at this update.
Window-handle level evidence
Process tracing alone can't distinguish a real console window from a headless one
(
CREATE_NO_WINDOWstill creates aconhost.exe). So I also polledEnumWindowsat 1 msand resolved each new window to its owning process. Actual visible windows:
20 such pairs in ~21 s. (Windows Terminal is the default terminal host here, which is why
the flash is a Terminal window rather than a classic black conhost window.)
Process trace over the same window:
Matches this report. One difference worth noting: the git calls are bursty, not
continuous — 41 calls in a 32-second burst while git-related UI was being opened, then
zero while the app sat idle. That matches "activity multiplies the flash frequency",
and suggests the trigger is the branch/diff UI rather than a background timer.
Likely root cause in
app.asarIn the main-process bundle there is a generic spawn helper:
windowsHideis forwarded from the caller with no default, so callers that omit it getwindowsHide: undefined— which is falsy, so Node does not passCREATE_NO_WINDOW.The git call path appears to omit it. Notably, the helper commands in the same file do
set it:
So the helpers that look for and kill git hide their windows, while the process that
actually runs git does not. Identifiers are minified and build-specific, so treat this as
a pointer rather than a patch.
If that reading is right, the one-line fix is to default it, e.g.
windowsHide:u=!0in the helper, or passwindowsHide:trueat the git call site.Reproduction
OpenAI.Codex26.930.2377.0 on Windows, open a Git repoWin32_ProcessStartTraceforgit.exewith parent pid = theChatGPT.exemain processEnumWindowsforCASCADIA_HOSTING_WINDOW_CLASS/PseudoConsoleWindowgit.exeburstsHappy to provide the raw traces (process tree + window log) if useful.
cilantro7 commentedon Oct 10, 2026
补充当前 Windows 桌面版复现证据(2026-10-10):
已安装并正在运行的 Microsoft Store 包版本为
OpenAI.Codex 26.1002.7124.0,通过Get-AppxPackage和运行中的ChatGPT.exe路径交叉确认。打开应用后反复出现标题为 Git 可执行程序的可见 Windows Terminal 窗口,影响正常使用。只读短时采样捕获到:
多个
git status和git config进程由ChatGPT.exe直接启动,没有经过 MCP 或 CodeGraph。另一次约 15 秒的采样,在应用直接启动的 Git 进程存在时,同时观察到其conhost.exe子进程,以及窗口句柄非零、标题包含 Git 的WindowsTerminal.exe窗口。窗口与 Git 的关联为时间上的共同观察,尚未通过逐窗口归属追踪证明一一对应。本机也存在 WebStorm 和 CodeGraph 启动的 Git 进程,但上述直接由
ChatGPT.exe启动的路径可独立观察到。Windows Terminal 配置中未发现将git.exe误设为交互式命令行。诊断期间未修改配置、终止进程或修改应用程序。这说明当前桌面包仍能复现同类可见窗口现象。未独立检查该版本
app.asar的启动标志,因此不将遗漏windowsHide视为已确认根因。请核对桌面应用直接启动 Git 的路径是否已包含窗口隐藏修复,并明确包含修复的 Windows 桌面包版本。反馈由用户明确授权提交;已省略用户名、项目路径、仓库地址、完整命令参数和登录信息。
hugotomita1201 commentedon Nov 3, 2026
Still happening on
OpenAI.Codex 26.1027.3384.0(Windows 11 Pro 10.0.26200), and with Windows Terminal set as the default terminal it is worse than a flash: each child becomes a Windows Terminal tab or window.What a process-start log on this machine shows:
ChatGPT.exe --type=utility --utility-sub-type=node.mojom.NodeService):gh.exe api graphql ...(pull request status),git.exe(status,ls-files,config --get core.fsmonitor,diff) andtaskkill.exe /pid <pid> /t /f.OpenConsole.exe -Embedding), and it opens a tab, or a new window.gh.exeorgit.exestarts. On this machine, a burst of 15-20 terminal tabs drops the mouse pointer to about 1 frame per second until the tabs close.The fix suggested above would cover this too:
windowsHide: true(orCREATE_NO_WINDOW) on every internal child, including theghcalls.