[Windows] Codex Desktop spawns hundreds of lingering taskkill.exe processes during agent work and freezes the OS
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- powershell, rust
- Domain
- desktop, devtools, operating-systems
Research direction
Start by reproducing the burst during Codex Desktop agent work on a Windows Git-backed workspace, using the provided PowerShell process query. Investigate the Windows subprocess cleanup path in Codex Desktop or app-server, focusing on overlapping taskkill.exe launches and unreaped processes. Done means cleanup processes exit or are reaped without accumulating, and agent work no longer makes the Windows session unresponsive.
Written by the indexing model from the issue text.
Description
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: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.
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.5k
- Avg merge
- 1m
- Merged PRs (30d)
- 1k
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from openai/codex
-
enhancement remote
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
bug CLI windows-os
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
macOS sandbox blocks hw.optional.arm64 sysctl, causing Flutter to misdetect Apple Silicon as x64 Openbug CLI sandbox
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
bug CLI TUI
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
-
CLI config enhancement skills
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
kwakseongjae/auto-hwp#319 ·
-
area:cli bug filter-quality good first issue priority:medium
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
bevyengine/bevy#25861 ·
-
comp-datalake
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
ClickHouse/ClickHouse#121222 ·
-
A-linter
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
oxc-project/oxc#26863 ·