Codex triggers high CPU usage in WMI Provider Host on Windows after startup
What version of the Codex App are you using (From “About Codex” dialog)?
26.616.51431
What subscription do you have?
Pro x20
What platform is your computer?
Microsoft Windows NT 10.0.26200.0 x64 13th Gen Intel(R) Core(TM) i5-13500
What issue are you seeing?
<img width="1605" height="405" alt="Image" src="https://github.com/user-attachments/assets/9d25bdc4-c067-4635-bde1-a967ec2eb50a" />
Title: Codex triggers high CPU usage in WMI Provider Host on Windows after startup
Issue:
Hi. I’m seeing a serious performance issue on Windows that appears to be triggered by launching Codex.
When my PC is idle, CPU usage is normally around 0-1%. After I start Codex, I expect some temporary CPU usage while the app loads projects, chats, and the sidebar. That part looks normal: the Codex process uses CPU for a few seconds, then its usage drops.
However, shortly after Codex finishes loading, CPU usage from WMI Provider Host (WmiPrvSE.exe) starts increasing significantly. In some cases it reaches around 50% CPU, even though I am not doing anything inside Codex. The app is just open and idle.
This causes severe system lag: the mouse cursor freezes every couple of seconds, the system becomes noticeably unresponsive, and the CPU appears to start throttling.
I’m fairly sure this is related to Codex because:
- The system is idle before launching Codex.
- The issue starts shortly after Codex is opened.
- If I close Codex and kill/restart the WMI Provider Host process, CPU usage returns to normal.
- If I launch Codex again, the same WMI Provider Host CPU spike happens again, even before I interact with the app.
Expected behavior:
After Codex finishes loading, both Codex and WMI Provider Host should return to low idle CPU usage.
Actual behavior:
Codex itself drops CPU usage after startup, but WMI Provider Host starts consuming a large amount of CPU and causes system-wide freezes.
Environment:
Environment:
- OS: Windows
- Shell configured in Codex: PowerShell
- WSL: not used / disabled in Codex settings
- Process affected:
WmiPrvSE.exe/ WMI Provider Host - Trigger: launching Codex and leaving it idle
- CPU impact: sometimes up to ~50%
- Result: fully system freezing every 1-2 second on 1-10 seconds and apparent CPU throttling
Please let me know if there are any logs, diagnostics, or traces I can provide to help identify which WMI queries or monitoring behavior Codex may be triggering.
What steps can reproduce the bug?
Uploaded performance trace: 019edb95-e480-70e2-9a8a-e3156ea2b9b3
What is the expected behavior?
_No response_
Additional information
_No response_
9 Comments
Thanks for writing this up. I am seeing a related Windows Codex Desktop performance regression in #28855: since June 12, opening/using Codex Desktop can cause severe intermittent mouse/typing/system input lag, and it still persists for me on
OpenAI.Codex 26.616.10790.0.I linked your report in a broader Discussion collecting recent Windows Desktop performance reports here: https://github.com/openai/codex/discussions/29949#discussioncomment-17428007
No action needed from you unless you want to add more detail there, but I wanted to connect the reports because the recent Windows issues look related enough that they may need a canonical tracker.
I have a lower-level confirmation from an affected machine that may help narrow this issue. This reproduces on Codex desktop 26.707.8479.0, Windows 11 25H2 build 26200.8737, immediately after a clean reboot.
Signed Microsoft WMI-Collect trace
I ran Microsoft's signed WMI-Collect/TSS collector with WMI Activity, RPC, provider-performance, and kernel-process tracing while Codex was actively streaming an agent turn.
In a 52.18-second trace:
IWbemServices::ConnectWin32_PerfFormattedData_PerfProc_ProcesscensusesWin32_ProcesscensusesWin32_Processdetail queriesAll operations succeeded on the fresh boot, but the broad calls were already expensive:
| Operation | Count | Median | Maximum |
| --- | ---: | ---: | ---: |
|
Win32_PerfFormattedData_PerfProc_Processcensus | 14 | 467.95 ms | 480.15 ms || Broad
Win32_Processcensus | 14 | 198.58 ms | 222.46 ms || Filtered
Win32_Processdetail | 13 | 205.91 ms | 213.26 ms |The
CIMWin32provider host reached 48.63% CPU during the trace. The collector completed without script errors and reported a healthy/consistent WMI repository, default provider quotas, no quota violations, default WMI permissions, and default DCOM/RPC settings.Installed-package analysis
Read-only inspection of the signed package found:
electron-app-state-snapshot-triggerthrough a 5-seconddeltaBurstEmitGate.Win32_Processcensus, then another PowerShell path for the broad formatted performance class plus selected process details.2533914996controls performance-span sampling only; no supported full Windows host-sampler override was found.Kernel retention / severity
On a prior 25.8-hour boot, the independent native pool recorder reached:
A targeted kernel ETW capture with symbols resolved sampled outstanding
Tokeallocations through:ExAllocatePoolWithTag -> ObCreateObjectEx -> SepDuplicateToken -> SepCreateClientSecurityEx -> SeCreateClientSecurity -> NtAlpcCreateSecurityContext/AlpcpCreateClientPort -> rpcrt4/combase -> fastprox/wbemcoreThe degraded session ended in an unrecovered whole-system hard hang. The final Codex child-process snapshot timed out at the same boundary where all machine telemetry stopped. There was no bugcheck or dump from that incident, so I am treating Codex as a proven high-rate trigger/amplifier, not claiming it is yet the uniquely proven owner of the final Windows retention/deadlock.
Requested containment/fix
Could OpenAI:
2533914996for the affected account as partial emergency containment.Blocking PowerShell, disabling WMI, patching the signed MSIX, or editing feature caches are not acceptable local mitigations.
I have a sanitized 26 KB evidence bundle ready. The raw Microsoft WMI ETL (864 MB), kernel ETL, provider dumps, and event logs are retained locally and can be transferred through a private maintainer channel.
I can independently confirm that this is still reproducible on a substantially newer Windows Desktop build, and in the affected state the impact can be much worse than a brief startup spike.
Environment
OpenAI.Codex_26.715.2305.0_x64User-visible impact
The problem is intermittent. Some launches remain normal, but when it triggers:
WmiPrvSE.exe/ WMI Provider Host consumes the resources;This is especially concerning on a 9950X3D: the result cannot reasonably be explained by a low-end machine or ordinary application startup work.
WMI Activity evidence
At 2026-07-17 15:59 JST,
Microsoft-Windows-WMI-Activity/Operationalrecorded a burst of Event ID 5858 entries. One representative event was:The client PIDs are short-lived. Additional events from the same failure pattern used
0x800706BAand reported that WMI could not send status back to the client.Exact correlation with Codex logs
The local Codex desktop log at the same instant contains:
The warning repeated at approximately:
After another Codex restart, a new log recorded seven more
[electron-sampler] Failed to collect child process snapshotwarnings between07:13:16Zand07:17:14Z.The commands recorded by Codex include both expensive paths already reported in this issue:
The second path builds a global CPU map and then queries a large
ORfilter containing many descendant PIDs. The stack points into the packaged desktop host:Read-only inspection of the installed package also confirms a focused-window heartbeat of roughly 30 seconds plus additional snapshot triggers. There is no supported user-facing switch that disables the complete Windows host sampler.
Why the intermittent nature does not reduce severity
The regular heartbeat and activity-triggered snapshots do not always overlap or fail. When WMI is responsive, the user may only see a short spike. When probes become slow, overlap, are cancelled, or repeatedly lose their client, the same implementation can turn into an Event 5858 storm and drive WMI Provider Host to saturation.
Requested containment
Could OpenAI please provide a public engineering status and ship an immediate containment while the native collector is being redesigned?
At minimum:
Win32_PerfFormattedData_PerfProc_Processenumeration;This reproduction appears to be the same defect family as #22912, #25453, and #32562. The important new data point is that it is still present in 26.715.2305.0 and can saturate a Ryzen 9 9950X3D system. A screenshot of the Event 5858 burst and the matching local logs are available if maintainers want them through a private channel.
Independent field confirmation with a long-running active Codex task. This appears to be the same defect family as #25453, but the long-duration failure mode is substantially more severe than a short startup spike.
Environment
OpenAI.Codex_26.715.2305.0_x6410.0.26200.8875User-visible impact
For most of the five-hour run:
WmiPrvSE.exe/ WMI Provider Host was a dominant consumer; one captured sample showed a single WMI Provider Host at 52.4%.Direct parent/command-line evidence
A native process-start capture (avoiding WMI for the capture itself) showed the packaged Codex Desktop
ChatGPT.exeparent repeatedly starting short-livedpowershell.exechildren every approximately 2-3 seconds.Captured commands included:
and:
WMI Activity evidence
From
Microsoft-Windows-WMI-Activity/Operational, during a 51-minute window:Win32_Processenumeration/query operations.0x80041032and0x800706BA("Could not send status to client").This strongly indicates high short-lived client-process churn, not one persistent WMI client.
Backpressure/overlap evidence
In the degraded state, a single native
tasklistprocess snapshot took approximately 21.8 seconds to complete.At the same time, Codex's process sampler continued creating new PowerShell/WMI clients at a much shorter interval. This creates a positive-feedback failure mode:
After the CPU storm temporarily subsided, a 16-second native performance-counter sample showed:
So this does not look primarily like hundreds of permanently unreaped
conhost.exeor PowerShell processes. It looks like a process churn / overlapping sampler / missing backpressure problem. The transient processes are generally reaped, but their creation and global WMI work can consume the whole machine.No Codex, WMI, PowerShell, console, or task process was terminated during this diagnosis; the five-hour task was allowed to continue.
Requested fix / containment
Please treat this as a high-severity system responsiveness issue for long-running Windows agent tasks:
Win32_PerfFormattedData_PerfProc_Processenumeration from the hot path.This long-run reproduction supports the overlap/backpressure hypothesis already discussed in #25453 and shows that the current implementation can sustain 100% CPU for hours on a 32-thread high-end CPU.
Happening all the time on my Win machine, Version 26.715.21425
Every Codex app start, and every task start in Codex.
This is a blocker, its taking all the cpu.
Report from codex, I think that can help to solve it:
The recorded command launched by Codex is:
This globally enumerates
Win32_PerfFormattedData_PerfProc_Process, then submits another query containing a large list of process IDs.Windows Event Viewer recorded 13 matching Event ID
5858failures. Representative event:Three exact timestamp correlations:
| Codex log, UTC | WMI Event Viewer, local time |
| --- | --- |
|
2026-07-17T21:28:09.802Z|2026-07-18 00:28:10||
2026-07-17T21:44:16.012Z|2026-07-18 00:44:16||
2026-07-17T22:32:32.358Z|2026-07-18 01:32:33|The short-lived client PIDs and
Could not send status to clientresult are consistent with Codex terminating or timing out its PowerShell sampler while WMI is still processing the enumeration.During the investigation, Codex updated to MSIX package
26.715.3651.0. Read-only inspection confirms that this newer package still contains:Win32_PerfFormattedData_PerfProc_Processenumeration;This is also reproduced in #33875 and appears related to #32562, #25453, and #22912.
Found the reason and the proper fix here on reddit! https://www.reddit.com/r/codex/comments/1uxpr1x/comment/oxt95ux
Encountered this issue yesterday. WMI process drains cpu resources. Closing codex-gpt windows app fixes it (win 11). Opening it again starts the issue again. Forced to use powershell CLI for now.
I updated the ChatGPT app to version 26.715.52143 (released 20.07.2026) via the Microsoft Store and am still experiencing this problem.
This is completely unacceptable, as I can't use my paid subscription if the software is hogging the CPU.
Same issue here; the following details were tested and provided by Codex 😃
---------------------------------
Independent confirmation from Windows 10 with the same WMI failure pattern.
Environment
OpenAI.Codex_26.715.4045.0_x64Observed behavior
While Codex Desktop is running,
WmiPrvSE.execan consume approximately 500–614% raw processor time, equivalent to about 5–6 logical CPU cores.Fully exiting all Codex processes immediately returns CPU usage to normal:
ChatGPT.execodex.execodex-code-mode-host.exeLaunching Codex again reproduces the issue.
WMI evidence
Microsoft-Windows-WMI-Activity/Operationalrecords bursts of Event ID 5858 from many short-lived client PIDs. The repeated operations include: