Aident AI

Fix Codex Windows High CPU: taskkill.exe and WMI
If Codex Desktop makes Windows stutter while hundreds of taskkill.exe and conhost.exe processes accumulate, fully exit Codex first. If the helper processes remain or Windows is already unstable, restart Windows, update the app, and reopen it with one local task while monitoring the process count. Do not kill every conhost.exe, restart WMI or Desktop Window Manager, or patch the installed app.
Multiple July 2026 reports describe this exact failure pattern. The reports connect the growing helper processes to the Codex ChatGPT.exe process tree, but OpenAI has not published a confirmed root cause or universal fix. Treat the steps below as a safe recovery and isolation workflow.
Prerequisites
Before you begin:
save open work and stop any Codex task whose output you still need;
use Windows PowerShell or PowerShell 7 under your normal account;
know how to open Task Manager with
Ctrl+Shift+Esc;record the app version from Settings > About and your Windows build from
winver.
Administrator access is not required to inspect processes you own. Windows may require an elevated PowerShell session to stop a process owned by another account.
Step 1: Confirm the Process-Storm Pattern
Run this once while Codex is open and the slowdown is happening:
Expected result on an affected machine: taskkill rises into dozens or hundreds, often with a growing conhost count. Several ChatGPT processes can be normal for a desktop app, and conhost.exe is used by other programs, so counts alone do not prove that Codex owns every process.
Sample the suspected cleanup processes:
Expected result during the reported bug: many live taskkill.exe processes have overlapping start times instead of exiting quickly. If there are zero or only transient entries, you may have a different Windows performance problem.
Step 2: Check the Parent Chain Once
Use one CIM snapshot to test whether the taskkill.exe processes are direct children of Codex and whether their conhost.exe children are accumulating:
Expected result for this failure class: CodexTaskkill and TaskkillConhost are both clearly above zero and keep growing during agent work. Recent issue reports captured 287 to 457 live taskkill.exe processes and 302 to 473 associated conhost.exe processes on affected machines.
Get-CimInstance takes a snapshot through Windows Management Instrumentation. If this command stalls because WMI is already overloaded, cancel it once with Ctrl+C and continue to recovery. Do not run it repeatedly.
Step 3: Fully Exit Codex
Closing only a window may leave the desktop app running.
Stop or cancel active Codex work once.
Use the app's Quit command or exit it from the system tray.
Wait ten seconds.
Open Task Manager and confirm the Codex or ChatGPT app group is gone.
Recount the cleanup processes:
Expected result: new taskkill.exe processes stop appearing and the count falls toward zero. If the count remains high, Task Manager will not open, or the desktop is still freezing, restart Windows. A restart is safer than terminating every system console host by name.
Do not use broad commands such as Stop-Process conhost -Force. They can terminate console sessions owned by unrelated programs. Do not restart or terminate WMI Provider Host or dwm.exe; the primary issue report explicitly warns against those workarounds.
Step 4: Update the Desktop App
After Windows restarts:
Update Codex through its normal app update path or the Microsoft Store.
Reopen the app and confirm the version changed if an update was available.
Expect the current update path to move existing Codex users into the new ChatGPT desktop app with Codex included. OpenAI says existing Codex chats and projects should remain.
Reinstalling the same version can clear accumulated state, but it does not prove that the underlying bug is fixed. Update first and keep a record of the exact version you test.
Step 5: Reproduce With One Bounded Task
Start with one local task that runs one short command. Avoid parallel shell work, repeated cancellations, command timeouts, and very large output during the test.
Before the task:
Run the task, wait one minute, then check again:
Expected result: cleanup helpers remain short-lived and Growth returns to zero. If the count grows continuously, fully exit the desktop app and use another Codex surface for local shell work until the Windows desktop issue is fixed.
Step 6: Report a Useful Reproduction
If the storm returns on the latest app version, collect only what maintainers need:
Codex or ChatGPT desktop app version;
Windows edition, version, build, and architecture;
UTC start time of the process growth;
taskkill.execount before and after one bounded task;whether the trigger involved a timeout, cancellation, concurrent commands, or large output;
whether fully exiting the app stopped new processes;
matching WMI Activity event IDs, if Event Viewer remains responsive.
Add the evidence to an existing matching OpenAI Codex issue. Do not upload repository names, prompts, local paths, tokens, or complete logs unless maintainers explicitly need a sanitized excerpt.
Common Failure Modes
What you see | What it means | Safe next step |
|---|---|---|
Hundreds of | Matches the reported cleanup storm | Fully exit Codex; restart Windows if helpers remain |
High | Another console application may own them | Do not kill them by name; inspect their parents |
WMI Provider Host uses high CPU but | This guide has not isolated the same failure class | Update, reboot, and collect a minimal process snapshot |
Counts fall after exit but return with the first agent task | The trigger remains active in that app version | Stop desktop local work and report the bounded reproduction |
Task Manager and PowerShell no longer open | Windows is already resource-starved | Restart from the secure screen or use a forced reboot as a last resort |
The updated app is named ChatGPT instead of Codex | This is the current OpenAI migration path | Open Codex inside the new desktop app and verify your projects |
Why This Recovery Works
The reports show the main ChatGPT.exe process creating cleanup helpers faster than Windows can reap them. Fully exiting the app removes the process that is creating new helpers. Restarting Windows clears the remaining process tree and resets WMI and desktop resources without selectively killing shared Windows services.
Limiting the first test to one short command does not repair the bug. It narrows the trigger and prevents another large backlog while you confirm whether the installed version still reproduces it.
For a separate Windows failure involving sandbox permissions, read How to Fix Codex Windows Sandbox Errors Safely. For suspicious usage growth, use the Codex usage spike diagnostic.
Run One External Action Without Sharing a Provider Key
Once the machine is stable, use a bounded read-only integration test instead of adding another long local shell workflow. In Codex, paste:
Then ask:
Expected result: one schema is inspected, one read-only result returns, no provider credential appears in the conversation, and the local taskkill.exe count does not grow.
Use Aident Loadout to run one read-only Action. Measure success as one verified result, no repository diff, no pasted secret, and no local process storm.
Sources
ChatGPT.exe spawns hundreds of taskkill.exe and conhost.exe processes, OpenAI Codex issue, opened July 17, 2026
Unbounded taskkill.exe/conhost.exe cleanup storm exhausts WMI, OpenAI Codex issue, opened July 20, 2026
Codex Desktop spawns hundreds of lingering taskkill.exe processes, OpenAI Codex issue, opened July 21, 2026
Moving to the new ChatGPT desktop app, OpenAI, accessed July 27, 2026
Get-Process, Microsoft, accessed July 27, 2026
Get-CimInstance, Microsoft, accessed July 27, 2026
Stop-Process, Microsoft, accessed July 27, 2026


