[Windows] Codex Desktop spawns hundreds of lingering taskkill.exe processes during agent work and freezes the OS
Summary
Codex Desktop on Windows rapidly spawns hundreds of taskkill.exe /PID <pid> /T /F processes during ordinary agent work. The taskkill.exe processes do not exit promptly, accumulate in large batches, and eventually make the entire Windows session effectively unusable.
This is not only a Codex UI freeze. During severe incidents, Task Manager cannot be opened, the desktop and other applications stop responding, and the machine must be restarted remotely or forcibly.
Environment
- Codex Desktop:
26.715.8383.0 - Package:
OpenAI.Codex_26.715.8383.0_x64__2p2nqsd0c76g0 - Windows:
25H2, build 26200.8655, x64 - Native Windows workspace and PowerShell
- Reproduces while the Diff/Review panel is closed
Steps to reproduce
- Launch Codex Desktop on Windows.
- Open a Git-backed local workspace.
- Start ordinary agent work that runs local shell/tool commands.
- Keep the Diff/Review panel closed.
- Sample live
taskkill.exeprocesses:
``powershell``
Get-Process taskkill -ErrorAction SilentlyContinue |
Select-Object Id, StartTime, CPU, Responding
- Observe a rapid burst of hundreds of simultaneously alive
taskkill.exeprocesses.
The issue is bursty and closely correlated with starting agent work.
Observed evidence
Snapshot 1
At 00:40:19:
- 321 simultaneously alive
taskkill.exeprocesses - Oldest surviving process started at
00:39:24 - Newest process started at
00:40:19 - New processes were still being created at the time of the sample
Representative command line:
C:\Windows\System32\taskkill.exe /pid <pid> /t /f
Snapshot 2
A second agent-work run produced another distinct burst:
| Time | Alive taskkill.exe | Started in previous 10s | Started in previous 60s |
|---|---:|---:|---:|
| 00:45:27 | 152 | 152 | 152 |
| 00:45:30 | 189 | 189 | 189 |
| 00:45:32 | 203 | 178 | 203 |
| 00:45:34 | 202 | 137 | 202 |
| 00:45:36 | 196 | 96 | 196 |
| 00:45:38 | 191 | 56 | 191 |
The burst began around 00:45:20; the newest process in that burst was created at 00:45:30. Spawning stopped temporarily, but 191 processes were still alive eight seconds later.
The monitoring command itself creates one Codex shell command, but cannot account for hundreds of taskkill.exe processes.
Controls already tested
- Closing the Diff/Review panel does not stop the process storm.
- The storm begins again when new agent work is dispatched.
- The repository's generated Python cache files were removed and ignored; the behavior still reproduced.
- Restarting Windows temporarily clears the accumulated processes, but the problem returns during later Codex work.
Expected behavior
Codex should:
- create at most one short-lived cleanup process per completed/timed-out child command;
- wait for or reap cleanup processes correctly;
- avoid launching overlapping cleanup batches for already-terminated targets;
- never accumulate hundreds of live
taskkill.exeprocesses; - never degrade the entire Windows shell or prevent Task Manager from starting.
Impact
This has become frequent enough to block development. Once enough processes accumulate:
- the entire Windows desktop becomes unresponsive;
- Task Manager may not open;
- local restart commands may not execute promptly;
- only a delayed remote restart or forced reboot recovers the machine.
Current hypothesis
This appears to be a Windows subprocess lifecycle/cleanup problem in Codex Desktop or app-server. Codex starts taskkill /PID ... /T /F cleanup commands, but the cleanup processes themselves remain alive while additional cleanup commands are launched. Repeated agent runs compound the backlog until Windows becomes resource-starved.
Related issues
- #16374 — Windows shell/UI freeze and hundreds of zombie child processes
- #17610 — timeout waiting for child process to exit / lingering process tree
- #20200 — countless Git child processes and machine crashes in large repositories
- #21957 — confirms the Windows app-server internally invokes
taskkill /T /F /PID
I have a local black-box monitor collecting one-second system counters and process-creation auditing. I can provide a sanitized process-creation CSV, target-PID frequency summary, and additional timestamps if maintainers specify the preferred attachment format.
6 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
The hundreds of lingering
taskkill.exeprocesses and OS freeze here are very close to the downstream behavior I measured. In my reproduction, repeated desktop Git refreshes were upstream, so this workaround is worth testing if the same parent chain is present.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. If the process storm in this issue has a different upstream cause, this may not apply. 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.
是的,我也遇到了这个问题
+1
Is causing my whole computer to lockup for a few seconds every few minutes.
ChatGPT Desktop:
26.715.21425/150.0.7871.124<img width="1116" height="766" alt="Image" src="https://github.com/user-attachments/assets/dfbbd836-6ed7-410b-8a04-1b2ef743f78a" />
same ,
Independent reproduction on another Windows machine
I can independently confirm the same persistent
taskkill.exe/conhost.exegrowth during ordinary local tool execution.Environment
OpenAI.Codex_26.715.10079.0_x64__2p2nqsd0c76g025H2, build26200.8875, x64Observed behavior
taskkill.exeand 477conhost.exeprocesses were alive.taskkill.exeprocesses were direct children of the Codex DesktopChatGPT.exeprocess.C:\Windows\System32\taskkill.exe /pid <pid> /t /ftaskkill.exeprocesses remained running.taskkill.exeand 90conhost.exeprocesses and did not promptly return to baseline.This confirms the behavior on a second Windows 25H2 / Codex Desktop 26.715 environment. I am reporting only the observed process-lifecycle behavior and am not claiming a specific source-level root cause. I can provide additional sanitized timestamps, parent/child relationships, and command-line samples if maintainers request a preferred format.