Windows Desktop: unbounded taskkill.exe/conhost.exe cleanup storm exhausts WMI
Summary
Codex Desktop on Windows can enter an unbounded process-cleanup loop where hundreds of taskkill.exe processes remain alive, each with a corresponding conhost.exe. The accumulated taskkill instances repeatedly query Win32_Process, exhaust the WMI provider quota, and make the entire Windows UI sluggish or unable to launch new processes.
This is related to openai/codex#17229 and openai/codex#21957, but the leaking processes in this case are taskkill.exe themselves rather than only git.exe/conhost.exe or leaked stdout.
Environment
- Codex Desktop:
26.715.4045.0 - OS: Windows 25H2 x64, build
26200.8875 - RAM: 32 GB
- Installation: Microsoft Store/MSIX package
OpenAI.Codex_26.715.4045.0_x64__2p2nqsd0c76g0
Observed behavior
During normal local-agent use involving shell commands, cancellations, and command timeouts, process counts grew continuously.
Peak measurements:
taskkill.exe: 457 processesconhost.exe: 473 processes- total processes: 1,388
- total threads: over 14,000
- total handles: over 350,000
- WMI provider private memory: 720.5 MB
All sampled taskkill.exe instances had the Codex Desktop main process (ChatGPT.exe inside the OpenAI.Codex package) as their parent. Most excess conhost.exe instances were children of those taskkill.exe processes.
Windows Event Viewer recorded:
- WMI event 5612:
PrivatePageCountexceeded its 512 MB quota. - WMI event 5612:
ThreadCountexceeded its 256-thread quota. - WMI Activity event 5858: repeated
Win32_Processqueries failed with0x80041006and0x80041033. taskkill.execrashed with exception0xc0000005(Application Error event 1000 / Windows Error Reporting event 1001).
Killing the accumulated taskkill.exe processes immediately reduced the total process count from 1,388 to about 565, and WMI private memory fell from 720.5 MB to about 104 MB. However, while the original Codex process remained running, taskkill.exe counts grew again from 156 to 320 in 20 seconds.
Fully restarting/reinstalling Codex cleared the bad state. With the same app version reinstalled, the stable baseline was:
taskkill.exe: 0conhost.exe: 12- total processes: about 390
- WMI: 139 MB private memory / 54 threads
Because the reinstalled version is identical, this appears to clear the accumulated state rather than fix the underlying bug.
Relevant packaged-app implementation
Inspection of the installed app.asar shows that the Windows process-tree cleanup path invokes approximately:
execFile(taskkill.exe, ["/pid", pid, "/t", "/f"], {
windowsHide: true,
});
The call does not appear to set a timeout. Cleanup is deduplicated per execution object, but there is no apparent global concurrency limit, backoff, or circuit breaker across multiple local executions. If taskkill.exe hangs because process enumeration/WMI is unhealthy, later cleanups can start additional taskkill.exe instances indefinitely.
Steps that may reproduce
- Open Codex Desktop on Windows and a local repository.
- Run multiple local shell operations, including operations that time out or are cancelled.
- Observe
taskkill.exeandconhost.exein Task Manager or Process Explorer. - If WMI/process enumeration becomes slow, observe whether
taskkill.exeinstances remain alive and increase continuously. - Keep the app open and observe WMI event 5858 failures and growing process/thread/handle counts.
The trigger is intermittent; the unbounded accumulation after the first stuck cleanup is the main defect.
Expected behavior
- A process-tree cleanup should complete or time out within a bounded period.
- Codex should not run hundreds of concurrent
taskkill.execleanup processes. - Repeated cleanup failures should activate backoff/circuit breaking and surface one actionable error to the user.
- Failure of WMI/process enumeration should not cause a system-wide process storm.
Suggested fixes
- Add a timeout to the
taskkill.exeinvocation and forcibly terminate a stuck cleanup helper. - Add a process-wide single-flight or small concurrency limit for Windows tree cleanup.
- Add exponential backoff/circuit breaking after repeated cleanup failures.
- Prefer Windows Job Objects or direct Win32 process-tree termination instead of spawning
taskkill.exefor every cleanup. - Log the target PID, duration, exit status, and number of concurrent cleanup operations.
35 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
I'm also affected by this issue and would appreciate any updates on the progress. Thanks for the work on this.
26.715.4045.0 here also affected by this. My work laptop is frozen with 80% of the CPU wasted on ChatGPT taskkills.
I have been suffering from this bug for several days now. I hope it can be fixed as soon as possible.
<img width="2539" height="1458" alt="Image" src="https://github.com/user-attachments/assets/ecbdb34c-4603-4454-bc21-3445d5698054" />
I can reproduce this on a newer Codex Desktop build, so the issue persists beyond 26.715.4045.0.
Environment
26.715.7063.0OpenAI.Codex_26.715.7063.0_x64__2p2nqsd0c76g010.0.26200Reproduction and evidence
After fully quitting Codex, restarting Windows, checking for app updates, and relaunching Codex, the process storm returned.
C:\Windows\System32\taskkill.exe /pid <pid> /t /fprocesses accumulated.taskkill.exehad the packaged Codex desktop main process (ChatGPT.exe) as its direct parent.git status --short --untracked-files=nocompleted in about 0.2 seconds, so repository Git responsiveness was not the trigger in this reproduction.The Codex desktop log repeatedly reports:
Windows WMI Activity event 5858 records repeated
Win32_Processquery failures from the cleanup processes with result codes:0x800410320x800706BE0x800706BAInspection of this build's packaged
app.asaralso shows that the Electron sampler:This appears to amplify the failure: a timed-out WMI snapshot leads to
taskkillcleanup; each stucktaskkillperforms anotherWin32_Processquery; later sampler cycles add more cleanup processes without effective global backoff/circuit breaking.The same sampler failure first appears in local Codex logs from 2026-07-15 under desktop build
26.707.9981.0, and continues under26.715.7063.0. No private paths, repository names, prompts, or raw logs are included here. Sanitized screenshots and selected log/event excerpts are available if maintainers need them.+1. Made whole app completly unuseable. With 2 220$ subscriptions. Great work, devs!
win 10, 26.715.52143
Confirmed on a newer Microsoft Store build with another Windows 10 reproduction.
Environment
OpenAI.Codex_26.715.7063.0_x64__2p2nqsd0c76g0Ok/StoreChatGPT.exefile version:150.0.7871.12419045.6466Observed behavior and evidence
Task Manager showed the following simultaneous CPU spike:
A read-only process/event investigation found:
Winmgmtwas hosted normally byC:\Windows\System32\svchost.exe -k netsvcs -p.svchost.exe,WmiPrvSE.exe, andtaskkill.exebinaries had valid Microsoft signatures.Win32_ProcessandWin32_PerfFormattedData_PerfProc_Process, with result codes including0x800706BA,0x80041032, and0x80041033.taskkill.exeprocesses, all direct children of the Codex Desktop mainChatGPT.exeprocess. Sampled command lines were of the form:``
text
``C:\Windows\System32\taskkill.exe /pid <pid> /t /f
taskkill.exeprocesses and ended with 202 still alive.Winmgmtand all fourWmiPrvSE.exeinstances back at 0%, consistent with a bursty query/cleanup storm rather than sustained load.CommandLineEventConsumerorActiveScriptEventConsumer; only the standard SCM event-log subscription was present. No TCP connections were owned by the WMI provider PIDs.Two later diagnostic commands timed out and may have amplified the subsequent
taskkill.execount. However, the 742 WMI failures and the Task Manager spike occurred before those diagnostics, so the underlying cleanup/query storm was already active.This matches the unbounded Windows cleanup behavior described in this issue and confirms that it still reproduces in Store build
26.715.7063.0on Windows 10. A bounded timeout plus global concurrency limit/backoff aroundtaskkill.exewould prevent this failure from escalating into system-wide WMI and process exhaustion.Usernames, repository paths, conversation contents, and unrelated process details were intentionally omitted. A screenshot of the WMI CPU spike can be provided if useful.
Additional WPR and controlled Git/MCP isolation evidence
I have an independent reproduction on:
26.715.4045.026200.8875, x64A 4.09 GiB Windows Performance Recorder trace captured the process storm with zero lost events or buffers. During its final 385-second incident window:
taskkill.exelaunches occurred.git.exe.git config --null --get core.fsmonitor.I later performed a controlled MCP-isolation comparison:
config.toml, removing Node REPL’s disabled flag.rev-parse HEAD,remote -v,config --null --get core.fsmonitor, andstatus --porcelain.git config --null --get core.fsmonitorcommand completed naturally in 91 ms.git -c core.hooksPath=NUL -c core.fsmonitor=false status --porcelainprocess alive.Earlier logs also showed automatic title/description sessions initializing complete helper/MCP environments while recording zero MCP tool executions. During the full recurrence, ten matching local helper suites remained resident simultaneously.
Normal application closure was incomplete twice during the follow-up. Residual ChatGPT processes had to be ended through Task Manager; one idle residual group used approximately 755 MB.
This evidence supports a compound lifecycle problem:
taskkill /Tthen enumerates that enlarged process table through WMI and can escalate into the reported storm.After restoring the original MCP configuration and performing a final clean restart, the app was stable with one expected helper suite, zero Git, zero taskkill, and zero exact
Win32_ProcessWMI failures during the final observation. This cleared the accumulated state but did not fix the underlying product defect.I can provide the full WPR ETL, targeted WPA CSV exports, event-log details, process command lines, and timestamped chronology if useful.
Existing OpenAI feedback ID:
019f7bb3-69e7-7f23-8635-79b16e2eb930.Related reports: #29408, #33531, and #34251.
Chronology note: #29408 documented the same Git polling command family on Codex versions
26.616.6631.0,26.623.11225.0, and26.707.62119. This indicates that the underlying Git polling defect predates26.715; the WPR evidence above in this comment connects that older behavior to the downstreamtaskkill/WMI storm.Same issue here, ChatGPT/Codex windows app is stuck in a runaway process-enumeration loop with taskkill.exe whenever launched, causing WMI to get stuck at 25% CPU constantly, lagging my entire PC.
If I launch Codex Desktop directly in user mode, it spawns a large number of terminal processes and keeps failing repeatedly, with up to five or six hundred such processes running. Meanwhile, the WMI Provider Host process consumes over 50% of system resources. However, when I run it as administrator, no excessive terminal processes are created and WMI operates normally. This issue is most likely caused by a permission-checking process that keeps failing and restarting continuously.
Right Click Codex And Run As Administrator may be helpful.
Thanks.
Follow-up from my machine:
I tested the “run ChatGPT/Codex as administrator” suggestion.
Result: it did not clearly eliminate the issue here. It may have reduced the severity, but the behavior still appeared.
Test summary:
Observed:
Conclusion:
On my machine, admin launch may reduce severity, but it did not fully stop taskkill.exe activity. This suggests the underlying helper/process cleanup loop may still be active.
Additional reproduction on newer build; switching to Work mode was the trigger
This issue still reproduces on a newer Microsoft Store build.
Environment
26.715.8383.0OpenAI.Codex_26.715.8383.0_x64__2p2nqsd0c76g019045.6466Trigger and user-visible impact
The incident started immediately after switching the newly updated unified desktop app to Work mode with a local folder available.
Task Manager then showed:
ChatGPT (630): approximately 630 child processesThe whole machine became severely degraded.
Process evidence collected before a full restart
A read-only process inventory found multiple retained helper suites:
node_repl.exehostsnpxlauncherscmd.exewrappersmcp/server.mjsworkersThe duplicated helpers were descendants of the packaged ChatGPT/Codex app-server process. Firecrawl was configured as
npx -y firecrawl-mcp; it appears to amplify the process count, but the broader defect is that complete helper/MCP suites were repeatedly initialized and retained instead of being reused or reaped.Windows Event Viewer recorded WMI event 5612 at 02:11:31:
ThreadCount: 300cimwin32.dllImportant diagnostic caveat: a subsequent read-only
Get-CimInstance Win32_Processinventory likely amplified the WMI CPU spike visible in the screenshot. The 49.4% WMI number should therefore not be attributed entirely to the original Work-mode trigger. The core product symptom remains the approximately 630-process ChatGPT group and the repeated retained helper suites that existed before restart.Recovery comparison
After fully quitting and reopening the desktop app:
node_repl.exe: 1node.exe: 6codex.exe: 1This cleared the accumulated state but does not fix the lifecycle defect.
This reproduction adds two data points to the existing report:
26.715.8383.0.The screenshot and additional sanitized process data are available if maintainers need them. Usernames, private paths, repository names, prompts, email addresses, and configuration secrets are intentionally omitted.
Follow-up: the trigger appears to be session-specific restoration
An additional user observation narrows the trigger further:
taskkill.exe: 0conhost.exe: 7node_repl.exe: 1node.exe: 6This suggests the trigger may be restoration of persisted per-conversation tool/helper state, rather than merely launching the desktop app or installing the update. A stale Work conversation may rehydrate multiple MCP/helper environments or replay cleanup state each time it is opened.
This is currently a strong user observation, not a deliberately repeated controlled reproduction: we did not ask the user to reopen it again because the previous occurrence saturated the machine. The calm baseline was collected using
Get-Processonly, specifically to avoid amplifying WMI load.Practical implication for diagnosis: compare a newly created Work conversation against reopening the affected persisted conversation, and inspect whether restored task/tool ownership records cause helper fan-out before any new tool call is made.
Independent reproduction with provider-level WMI trace and a restart control
I independently reproduced this failure and collected a short, sanitized provider-level trace.
Environment
OpenAI.Codex_26.715.7063.0_x64ChatGPT.exefile version:150.0.7871.124User-visible impact
During the incident, Task Manager showed approximately:
The machine was severely sluggish and ordinary commands launched through Codex were taking much longer than normal.
Provider and query evidence
A WMI provider health-counter sample identified
CIMWin32as the hot provider. Its raw processor counter ranged from approximately 241% to 393%, equivalent to about 15%–25% of the whole 16-logical-processor machine. Other active WMI providers were near zero.A 12-second administrator WMI Trace capture recorded:
CIMWin32queries ofWin32_Process, selecting process ID, parent PID, session, thread count, working set, and kernel/user CPU time.cimwin32.dllinside the busyWmiPrvSE.exehost.git.exelaunches and 106taskkill.exelaunches directly parented by the packaged desktop application's mainChatGPT.exeprocess.This matches the cleanup/process-enumeration amplification described in this issue: Codex creates short-lived helpers, the helpers repeatedly enumerate
Win32_Process, and the resulting WMI workload is charged toWmiPrvSE.exe/Winmgmtrather than primarily to the Codex process itself.Before/after control
After fully quitting and restarting Codex, I repeated the same provider-counter check:
CIMWin32and the other WMI providers.I did not establish a single repository-specific trigger in this reproduction. The captured evidence supports adding a bounded timeout, global concurrency limit, and backoff/circuit breaker around Windows process cleanup and process-snapshot helpers.
No raw trace is attached because it contains local identifiers. Sanitized aggregate results and selected redacted event records can be provided if useful.
The unbounded
taskkill.exe/conhost.execleanup storm and WMI exhaustion here closely match the downstream behavior I measured; repeated Git refreshes were upstream in my reproduction.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.
Additional user observation after switching most local file/terminal work to FastCtx (an MCP tool runtime): for an initial period I did not see the previous taskkill.exe / conhost.exe accumulation or WMI-exhaustion behavior in ordinary Codex use.
Update: the storm has now recurred while writing this comment: 339 taskkill.exe and 351 conhost.exe processes, about 1,058 total processes, ~297,594 handles, and a WmiPrvSE instance at ~541 MB private memory. This is therefore not a fix and strongly supports the report's intermittent-trigger / unbounded-accumulation model.
FastCtx may have changed the workload and temporarily reduced the frequency of shell operations, cancellations, or timeouts that trigger cleanup, but it has not prevented the underlying Windows cleanup-path defect.
<!-- Retracted: submitted through an unintended connected GitHub account. -->
I can independently confirm this failure mode on the same Codex Desktop build, and I can add evidence for a likely trigger. This is not yet a deterministic minimal reproduction, so I am separating observed facts from the inferred mechanism.
Environment
OpenAI.Codex_26.715.4045.0_x64(Microsoft Store/MSIX)26200, x640.144.5User-visible impact
During the affected period, Windows Task Manager showed:
The entire desktop visibly stuttered even though no heavy foreground application was running. CPU later returned to approximately 12% after the event subsided.
Likely high-probability trigger
A background Git
review-summaryoperation was scanning a repository that contained 2,237 untracked and unignored files (approximately 26.5 MB) while another turn was actively generating and updating files.The local Codex Desktop logs contained:
review-summaryabort recordsA correlated ETW capture contained approximately 2,880 process-start records involving Git, conhost, and taskkill activity during the incident.
Inspection of the installed application bundle shows a stale Git snapshot path that advances the snapshot generation and calls
AbortController.abort(). The Windows process-tree cleanup path then invokes approximately:taskkill /pid <pid> /t /fThis makes stale
review-summarycancellation a plausible trigger or amplifier for the unbounded cleanup/WMI storm. Source-level confirmation by a maintainer is still needed.Suggested investigation areas
review-summaryrefreshes while the worktree is changing.taskkillcleanup.Could a maintainer confirm whether stale
review-summarycancellation reaches this Windows cleanup path and whether that path currently has a process-wide timeout or concurrency limit?The project names, local paths, prompts and thread IDs have intentionally been omitted.
I published an independent, Windows-first diagnostic and containment skill for this failure signature while an upstream fix is pending:
https://github.com/onovich/fix-codex-lag.skill
FixCodexLag takes one bounded process snapshot, detects taskkill/conhost/Git-helper churn and correlated WMI/Defender pressure, and reports a clear confirmed / not detected / inconclusive verdict.
It asks before taking any action. A runtime tree is cleanup-eligible only when strong ownership and lifecycle evidence proves that its Codex task has ended. Active or ambiguous process trees are preserved.
This is a temporary community mitigation, not an upstream fix. If the storm is rooted in the shared app-server and no safe leaf can be isolated, the skill reports that rather than guessing. It does not address the separate logs_2.sqlite/WAL write-storm issue.
Confirmed on a newer Codex Desktop build with additional evidence connecting the cleanup storm, the Electron sampler, and review-summary cancellations.
Environment
26.715.10079.026200.8875powershell.exe.Live evidence
During the affected session, the process tree showed
ChatGPT.exe -> taskkill.exe -> conhost.exe, with roughly 240 console-host processes present at the peak. WMI process enumeration then failed with resource/quota errors.The packaged Desktop implementation contains two interacting paths:
The packaged constants show:
The Desktop log recorded 14
[electron-sampler] Failed to collect child process snapshotevents in this session, including repeatedWin32_Processfailures with HRESULT0x80041006.requestKind=review-summary source=review_modelabortedBeforeStartabortedafter a process had startedFor started Git work, the packaged local execution host uses
killProcessTree=true; on Windows that calls:There is per-execution deduplication, but no visible process-wide concurrency limit, timeout, backoff, or circuit breaker around the
taskkill.execalls.Healthy-state comparison
After the storm ended, without changing the Codex version:
taskkill.exe: 0conhost.exe: 7Win32_Processquery: 390 msWin32_PerfFormattedData_PerfProc_Processquery: 651 msThis supports a threshold/feedback-loop failure: on a healthy machine or healthy WMI state, the sampler finishes quickly and the helper exits; once cleanup processes accumulate and WMI exceeds the 5-second window or quota, sampler retries and additional cleanup work amplify the backlog. This also explains why another Windows PC with the same general workflow may not reproduce.
Requested fixes
taskkill.execleanup.review-summarywork so that a changing worktree does not repeatedly start and abort Git processes.No prompts, usernames, repository names, or raw logs are included. Sanitized excerpts can be provided if needed.
Follow-up with a low-impact local mitigation result.
The affected saved-but-inactive repository had 350 untracked/unignored paths; 345 were generated artifacts under one top-level build directory. Git itself was healthy (
status --untracked-files=allabout 71 ms), so the issue was not a slow or corrupt Git repository. The Desktop review worker was nevertheless scheduling file-specifichash-object/diffwork for those artifacts and aborting stale snapshots.I added only a repository-local, non-committed exclusion:
No files were deleted, no tracked files changed, and no shared
.gitignorewas modified.Result:
taskkill.exe=0taskkill.exe=0conhost.exe: 5, down from 7 at the recovered baselineThis is not an upstream fix, but it is a substantially narrower workaround than launching with
GIT_DIR=NUL: normal Git integration remains available, while generated artifacts are removed from background review snapshots. A per-project “disable background review/untracked scan” setting would still be valuable.Independent reproduction on Codex Desktop for Windows, with a direct parent-chain capture.
Environment
OpenAI.Codex_26.715.9757.0_x64__2p2nqsd0c76g0Reproduction evidence
The initial affected snapshot contained:
taskkill.execonhost.exeDuring a later observation window, the storm reproduced again:
taskkill.exeprocesses were created in approximately nine secondstaskkill.exehad the same direct parent: the Codex Desktop rootChatGPT.exe(PID 2412 for that run)C:\Program Files\WindowsApps\OpenAI.Codex_26.715.9757.0_x64__2p2nqsd0c76g0\app\ChatGPT.exeC:\Windows\System32\taskkill.exe /pid <unique-pid> /t /fLarge .NET operations amplified the resource impact: one solution build created 31 reusable MSBuild worker nodes in the same second. Another command returned
Script running with cell ID ...and was not polled to completion before more work continued. These supplied many process trees for cleanup, but MSBuild did not launchtaskkill.exe; the direct launcher wasChatGPT.exe.Cleanup behavior
Stopping only the accumulated cleanup helpers temporarily recovered the machine:
taskkill.exe, leaving 0 immediately afterwardconhost.exefell to 57dotnet build-server shutdownreduced .NET processes from 33 to 1However, while the same Codex Desktop host remained alive, the cleanup storm immediately returned:
taskkill.execonhost.exeThis strongly supports an unbounded or re-entrant cleanup loop in the Desktop host. Killing individual helpers is not a stable workaround; fully exiting/restarting Codex Desktop is required to clear the active bad state.
Local mitigations applied
As defense in depth for the .NET amplification path, future Codex-launched builds are now serialized with a named mutex and forced to use:
--disable-build-servers-m:1-nr:false-p:UseSharedCompilation=falseMSBUILDDISABLENODEREUSE=1DOTNET_CLI_USE_MSBUILD_SERVER=0These reduce child-process volume, but they cannot prevent the general Codex Desktop
taskkillcleanup defect for non-.NET shell helpers.Suggested product-level guard
Please consider a process-wide concurrency limit/single-flight guard, a hard timeout for each
taskkill.exe, and circuit breaking after repeated cleanup failures. Using a Windows Job Object or direct Win32 termination would avoid spawning an external console process for every cleanup target.This reproduction intentionally excludes usernames, private repository names/content, prompts, credentials, and application data.
@crmaris Thanks for the independent reproduction. Your direct parent-chain capture matches what we found on our affected Windows machine.
Our investigation narrowed the local amplification path as follows:
taskkill.exeprocesses were launched directly by the packaged Codex DesktopChatGPT.exe, not by PowerShell, Git, MSBuild, or the user.[electron-sampler] Failed to collect child process snapshotevents while the sampler was queryingWin32_Processthrough Windows PowerShell/WMI.review-summarywork. Started executions used Windows process-tree cleanup, resulting intaskkill.exe /pid <pid> /t /f.builddirectory. Those artifacts caused additional file-specifichash-object/diffwork and stale snapshot cancellation.Our temporary containment was deliberately repository-local and non-committed:
No generated files were deleted, no tracked files changed, and the shared
.gitignorewas not modified. This reduced the untracked paths visible to the Desktop review worker from 350 to 3.After first fully exiting/restarting Codex to clear the already-active bad state, we observed two clean windows:
taskkill.exe=0taskkill.exe=0This has been an effective local workaround for that repository while preserving normal Git integration, but it is not an upstream fix. It only removes one strong amplification source; the general Desktop cleanup defect can still affect non-Git/non-.NET helpers. Once the storm is already active, killing individual helpers is ineffective, as you observed; a full Desktop restart is needed to reset the host state.
Independent reproduction on the same Windows desktop build confirms this issue, including the cold/idle startup variant.
Environment
OpenAI.Codex_26.715.4045.0_x64__2p2nqsd0c76g0codex-command-runner-0.145.0-alpha.18Observed behavior
Merely launching Codex/ChatGPT Desktop, without intentionally starting a task, caused process, thread, handle, and memory counts to grow continuously. Fully closing the Codex/ChatGPT processes caused the counts to fall back toward baseline.
A live snapshot during the storm showed:
1,66911,179398,810taskkill.exe:618processes /114,606aggregate handlesconhost.exe:649processes /63,534aggregate handlesEarlier before/after screenshots from the same launch showed growth within approximately 101 seconds from:
313 -> 8715,079 -> 8,701147,879 -> 251,81311.4 GB -> 17.6 GBThe counts continued increasing after that snapshot.
Parent-process confirmation
A WMI-independent Toolhelp32 process-tree capture was used because WMI became too slow to answer during the storm. In one diagnostic sample, all 587 live
taskkill.exeinstances had the Codex DesktopChatGPT.exeprocess (PID 28712) as their direct parent:Closing Codex stopped the spawning and returned the system to approximately
380processes /5,000threads /150,000handles.This independently supports the existing diagnosis that the desktop cleanup path can enter an unbounded
taskkill.exespawn loop. It also confirms that the trigger can occur immediately after restoring/launching the desktop app, before the user intentionally initiates a new task.A sanitized diagnostic ZIP containing six-sample process timelines, parent PIDs, grouped handle/thread/RAM counts, app versions, and no chat/config contents is available if maintainers need it.
26.715.72359 still exist. Codex dev folks, do you realize that it's a blocker not even major bug? The desktop app is complitly unuseable. Like at all =)
And we all still paying subscription for the unuseable app. Is there any workarounds maybe? till the official fix.
Independent reproduction: 26.715.10079.0, WmiPrvSE at 49% CPU, 39k CPU-seconds
Same failure mode on a newer Store build.
Environment
OpenAI.Codex_26.715.10079.0_x64__2p2nqsd0c76g026200Live evidence from an active storm
WmiPrvSE.exe PID 101532 accumulated 39,325 CPU-seconds in ~2 hours -- sustained 49% CPU. Three WmiPrvSE instances were running.
Every live
taskkill.exewas a direct child ofChatGPT.exePID 85172 (Codex Desktop main process). All rantaskkill.exe /pid <pid> /t /f. 13 instances alive at capture, spawning at 3-5/sec.Full process tree under PID 85172:
hash-objectin one repoSampler amplifies the loop
The two
powershell.exechildren are Codex's[electron-sampler]. Every 30 seconds it runs:This is Codex monitoring its own child processes via WMI. When the taskkill pile-up starts, these queries slow down, hit the same WMI quota, and log
[electron-sampler] Failed to collect child process snapshot. Retries add more WMI load.So the feedback loop has three participants:
If the sampler used
CreateToolhelp32Snapshotinstead of WMI on Windows, it would remove one amplifier.Workaround tested
Stop-Process -Name ChatGPT,codex -Forcekilled the tree. WmiPrvSE CPU dropped from 49% to near zero in 30 seconds. Relaunch worked normally.Per-repo
.git/info/excludeadditions reduced Git scanning volume, but the underlying taskkill/WMI loop is still present.I was able to recover my working environment, by deleting all conversations and projects from codex app, i.e. performing a factory reset.
~/.codex/sessionsand remove all sessions. You can backup to a different directory instead of deleting them.~/.codex/.codex-global-state.jsonfile.Then when you start codex app, you should get a clean and empty workspace, and the CPU usage should drop quickly.
If you have unfinished sessions, use codex CLI instead, resume your conversation, ask it to dump a handover markdown file. You can then pick the handover file in codex desktop app later, after the reset.
I published a standalone MIT-licensed containment guard for this specific Windows failure mode:
https://github.com/PPandYY/codex-windows-taskkill-guard
Release: https://github.com/PPandYY/codex-windows-taskkill-guard/releases/tag/v0.1.0
This is a temporary community mitigation, not an upstream fix.
The guard:
NtQuerySystemInformation-based native snapshots rather than WMI;taskkill.exechildren directly owned by a package-verified CodexChatGPT.exe;app\ChatGPT.exesuffix,System32\taskkill.exepath, PID/creation-time identity, and direct parentage all match;BelowNormal, runs the guard atAboveNormal, and releases after 10 quiet seconds;On one affected Windows machine, under the same 30-second workload:
taskkill.exepeak: 26 -> 5conhost.exepeak: 39 -> 17The trade-off is explicit: suppressing cleanup helpers during a storm can leave an individual tool child running. The guard never terminates Codex or
conhost.exe, and never broadens its target set.The public repo includes 34 Python tests plus PowerShell installation/rollback fixtures. This result supports implementing a process-wide cleanup concurrency/timeout fix upstream and replacing the Desktop WMI sampler with native process APIs.
Current build still contains the disposal-to-
taskkillpathI reproduced this again after updating to the current Microsoft Store package:
OpenAI.Codex_26.721.3996.0_x64__2p2nqsd0c76g0With the normal profile, the storm still starts during cold launch. Removing all pinned tasks did not prevent it: one controlled run observed 40 unique
taskkill.exeprocesses, about 3.8 GiB peak Desktop working set, and heavy disk activity within the first minute. Direct Git control commands against the same repositories completed normally in approximately 1.5–3.4 seconds.Read-only inspection of this exact installed build's
app.asarshows a more specific cleanup trigger than a generally slow Git repository:stdinas an RPC-backedWritableStream.WritableStreamStubHook.dispose()callswriter.abort(...).stdinabort handler invokes child cleanup.killProcessTree=true, the Windows cleanup path invokes:``
text
``taskkill.exe /pid <pid> /t /f
taskkillexecFilecall still has no visible hard timeout, process-wide concurrency limit, per-target single-flight guard, backoff, or circuit breaker.This means normal RPC stub disposal can be interpreted as cancellation and reach process-tree termination even when the read-only Git operation itself is not slow. Large/restored workspaces and long task histories increase the number of background Git/RPC lifecycles, but they are amplifiers rather than the root defect.
A separate clean isolated
CODEX_HOMEwith no sessions, projects, or authentication produced notaskkillstorm, but still reached roughly 2.5 GiB Desktop working set and heavy plugin-related disk I/O. That separates the general startup resource problem from this cleanup defect; deleting conversation history is not a complete fix.Suggested product-side fixes:
stdinexplicitly on normal completion before disposing the RPC stub;Acceptance should include completed read-only Git commands whose RPC stubs are disposed without launching
taskkill.exe, plus a stress test proving cleanup concurrency remains bounded when many background Git operations are cancelled.No usernames, repository names, absolute user paths, session contents, credentials, or raw traces are included. Sanitized ETW/log excerpts can be provided if a maintainer requests a specific format.
Independent reproduction on
26.715.10079.0I independently reproduced this issue using read-only monitoring that did not stop, pause, or modify any running applications.
Evidence collected during the active slowdown:
taskkill.exeprocesses in 8 seconds (~30.6 launches/second).taskkill.exewas a direct child of the packaged Codex DesktopChatGPT.exe.ExecQuerystarts (~57.6/second).Win32_Process, including process IDs, parent IDs, working sets, thread counts, and CPU times.WmiPrvSE.exeand 1.34 cores to the Winmgmt service host.User-visible impact included browser updates occurring only every few seconds, delayed typing in text fields, delayed mouse-hover feedback, and general desktop sluggishness. Memory, disk, and GPU saturation were not observed.
The app was intentionally left running because active background work could not be interrupted, so a restart comparison was not performed. Raw ETL traces and process exports have been retained locally but are not attached publicly because they may contain local paths, identifiers, command lines, or unrelated process information. A sanitized extract can be provided through an appropriate private channel if requested.
Follow-up: process storm contained, but a separate full-rollout scan still makes Desktop unusable
I ran controlled local experiments against the current Store build
26.721.3996.0using a disposable portable copy. The real sessions were never deleted or modified.The reproduction includes an active legacy goal thread whose JSONL rollout is about 4 GiB. Removing pinned tasks did not help.
What the experiments separated
taskkill.exe, and disabling the WMI child-process sampler, prevented the original unboundedtaskkillprocess storm. Process count stayed bounded.codex.exesustained roughly 100-140 MiB/s reads until an external guard terminated only the disposable build.thread/read(includeTurns=true): about 60 KiB returned in under 1 second;thread/resumewithexcludeTurns=true, a 5-turn initial page, and deferred goal continuation: 61 KiB response, 6.4 seconds, about 279 MiB peak backend working set, and no automatic turn.thread/resume, the renderer sendsthread/goal/getand thenthread/goal/set. That second request starts the destructive scan.Specific backend path
In
app-server/src/request_processors/thread_goal_processor.rs, both goal set and clear callreconcile_thread_goal_rollout(...). It unconditionally callsreconcile_rollout(...)with no builder and no incremental items.In
rollout/src/state_db.rs, that shape falls through tometadata::extract_metadata_from_rollout(...), which scans the rollout file. For an already materialized thread whose metadata row already exists in SQLite, this is redundant, but it rereads the complete multi-gigabyte legacy JSONL.The app-server trace showed
thread/goal/setenteringcodex_rollout::recorder/ rollout reconciliation at exactly the point where backend disk reads and RAM growth began.Suggested product-side change
Before reconciling a goal mutation, check whether the thread metadata row already exists in
StateRuntime:An acceptance test should use a large legacy rollout with existing SQLite metadata and verify that
thread/resumefollowed bythread/goal/setreads only a bounded suffix / incremental data, does not materialize the full JSONL, and does not start a turn when goal continuation is deferred.This appears to be a compound failure:
taskkill/WMI cleanup loop is one root defect;The local patches were diagnostic only and are not presented as a production-ready fix. I am stopping the experiments and cleaning up the disposable build, but this should provide a narrower upstream target without requiring users to delete their conversations.
Current-build follow-up:
26.721.4979.0isolates two repeated WMI snapshot callersI reproduced the remaining WMI polling on the current Windows Store package:
19045.6466OpenAI.Codex_26.721.4979.0_x64__2p2nqsd0c76g0app.asarwere not modifiedA 10.097-second Microsoft-Windows-Kernel-Process ETW baseline recorded 14 direct
powershell.exechildren of the Electron main process (1.387/s), with the activeWmiPrvSE.exeprocesses consuming about 0.286 logical cores in aggregate.Windows PowerShell Event 400/403 recorded only these two commands in that window:
A short, reversible
ChildProcess.spawntrace in the Electron main process identified the exact remaining stack:Current bundle inspection shows two independent callers:
ElectronSampler.addChildProcessFields()creates the dedicatedchild-process-snapshot-worker.jsworker.tXin this build) callslistProcessSubtreesfromupsert/complete, retries at[0, 100, 300, 600]ms, and then falls back to a detached-process candidate scan.To isolate causality without restarting Codex, I temporarily neutralized only those two seams in the same Electron PID:
listProcessSubtreesandlistDetachedProcessCandidatesdependencies returned empty arrays.The real execution host, ordinary worker construction, Git, PowerShell, and the
taskkill.execleanup function were not globally intercepted.Results:
| State | Window | Direct PowerShell children | Rate | Aggregate WmiPrvSE core equivalent |
| --- | ---: | ---: | ---: | ---: |
| Baseline | 10.097 s | 14 | 1.387/s | 0.286 |
| Both snapshot seams neutralized | 10.063 s | 0 | 0/s | 0.000 |
| Restore/reapply verification | 10.048 s | 0 across all 9 current ChatGPT PIDs | 0/s | 0.023 |
The last small provider-host delta was not accompanied by any child process start from any current ChatGPT PID. The Electron main PID and start time did not change, the temporary loopback Inspector was closed, and no ETW session remained.
This is a causal isolation, not a suitable product workaround: returning empty process snapshots can make background/detached-process attribution incomplete.
Suggested product fix:
NtQuerySystemInformationor Toolhelp32 plus process metrics);taskkill.exe/WMI feedback loop.The Electron Desktop implementation is not present in the public repository, so I cannot submit the product-code PR against
openai/codex. This comment provides the current-build call sites and controlled A/B for the private Desktop implementation.while we believe
26.730.7989.0substantially improves the WMI storm, there are still many cases of taskkill floods that we need to resolve separately. leaving this issue open to track taskkill issues, but if you were suffering mostly WMI-related system exhaustion, re-test on26.730.7989.0I can confirm that I am still experiencing this issue on Windows 11 Pro, and my codex version is
26.803.10989.0. As soon as I launch the ChatGPT/Codex desktop application, it spawns a bunch of taskkill/git tasks and then my WMI Provider Host process spikes. If left alone it causes a system crash, but if I kill the ChatGPT/Codex desktop application in task manager the WMI storm subsides and everything goes back to before I tried to launch.Windows 11 Pro, updated to ChatGPT/Codex desktop version 26.810.41047 and launched without seeing these issues anymore.