Fix Codex Windows High CPU: taskkill.exe and WMI

Fix Codex Windows High CPU: taskkill.exe and WMI

Aident AI

Dark process tiles spiral around a blue core, changing from an orange warning swarm into orderly cyan paths.

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:

Get-Process ChatGPT, taskkill, conhost, powershell -ErrorAction SilentlyContinue |
  Group-Object ProcessName |
  Sort-Object Count -Descending |
  Select-Object Count, Name

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:

Get-Process taskkill -ErrorAction SilentlyContinue |
  Select-Object Id, StartTime, CPU, Responding

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:

$allProcesses = Get-CimInstance Win32_Process `
  -Property Name, ProcessId, ParentProcessId

$codexIds = @(
  $allProcesses |
    Where-Object Name -eq "ChatGPT.exe" |
    Select-Object -ExpandProperty ProcessId
)

$codexTaskkill = @(
  $allProcesses |
    Where-Object {
      $_.Name -eq "taskkill.exe" -and
      $_.ParentProcessId -in $codexIds
    }
)

$taskkillIds = @($codexTaskkill.ProcessId)
$codexConhost = @(
  $allProcesses |
    Where-Object {
      $_.Name -eq "conhost.exe" -and
      $_.ParentProcessId -in $taskkillIds
    }
)

[pscustomobject]@{
  CodexProcesses = $codexIds.Count
  CodexTaskkill   = $codexTaskkill.Count
  TaskkillConhost = $codexConhost.Count
}

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.

  1. Stop or cancel active Codex work once.

  2. Use the app's Quit command or exit it from the system tray.

  3. Wait ten seconds.

  4. Open Task Manager and confirm the Codex or ChatGPT app group is gone.

  5. Recount the cleanup processes:

@(Get-Process taskkill -ErrorAction SilentlyContinue).Count

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:

  1. Update Codex through its normal app update path or the Microsoft Store.

  2. Reopen the app and confirm the version changed if an update was available.

  3. 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:

$before = @(Get-Process taskkill -ErrorAction SilentlyContinue).Count
$before

Run the task, wait one minute, then check again:

$after = @(Get-Process taskkill -ErrorAction SilentlyContinue).Count
[pscustomobject]@{
  Before = $before
  After  = $after
  Growth = $after - $before
}

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.exe count 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 taskkill.exe entries under ChatGPT.exe

Matches the reported cleanup storm

Fully exit Codex; restart Windows if helpers remain

High conhost.exe count without the Codex parent chain

Another console application may own them

Do not kill them by name; inspect their parents

WMI Provider Host uses high CPU but taskkill.exe stays low

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:

Follow https://aident.ai/SETUP.md

Then ask:

Check my Aident Loadout account and Vault status.
Find one connected read-only Action that can list GitHub issues.
Inspect its current input schema, execute it once with a harmless query, and stop.
Do not edit files, run parallel local commands, or ask me to paste a provider key

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

Home

Home

Home

Integrations

Integrations

Integrations

Vault

Vault

Vault

Audit

Audit

Audit

Arana Grande

Arana Grande

Arana Grande

Free

Free

Free

30-day audit summary

30-day audit summary

30-day audit summary

Daily action-call volume and the latest receipts from the Loadout audit trail.

Daily action-call volume and the latest receipts from the Loadout audit trail.

Daily action-call volume and the latest receipts from the Loadout audit trail.

View Audit

View Audit

View Audit

Loadout usage

Loadout usage

Loadout usage

617 action calls in the last 30 days

617 action calls in the last 30 days

617 action calls in the last 30 days

May 19 - Jun 17

May 19 - Jun 17

May 19 - Jun 17

10 active days

10 active days

10 active days

Less

Less

Less

More

More

More

Recent activity

Recent activity

Recent activity

Latest action-call receipts from connected agents

Latest action-call receipts from connected agents

Latest action-call receipts from connected agents

Apr 23, 09:23 AM

Apr 23, 09:23 AM

Apr 23, 09:23 AM

Shopify

Shopify

Shopify

Creates Or Updates An Asset For A Theme

Creates Or Updates An Asset For A Theme

Creates Or Updates An Asset For A Theme

Success

Success

Success

Apr 23, 09:21 AM

Apr 23, 09:21 AM

Apr 23, 09:21 AM

Shopify

Shopify

Shopify

Update Products Param Product Id

Update Products Param Product Id

Update Products Param Product Id

Success

Success

Success

Apr 23, 08:53 AM

Apr 23, 08:53 AM

Apr 23, 08:53 AM

Shopify

Shopify

Shopify

Update Products Param Product Id

Update Products Param Product Id

Update Products Param Product Id

Failed

Failed

Failed

Apr 22, 22:13 PM

Apr 22, 22:13 PM

Apr 22, 22:13 PM

Shopify

Shopify

Shopify

Create Product Image

Create Product Image

Create Product Image

Success

Success

Success

Apr 22, 22:12 PM

Apr 22, 22:12 PM

Apr 22, 22:12 PM

Shopify

Shopify

Shopify

Create Product Image

Create Product Image

Create Product Image

Success

Success

Success

Connected integration coverage

Connected integration coverage

Connected integration coverage

162

162

162

of 753 accessible connected

of 753 accessible connected

of 753 accessible connected

Callable actions

Callable actions

Callable actions

1,126

1,126

1,126

Vault credentials

Vault credentials

Vault credentials

8

8

8

Explore what's possible

Explore what's possible

Explore what's possible

See all Integrations

See all Integrations

See all Integrations

Google Ads

Google Ads

Google Ads

All available Goolge Ads tools via...

All available Goolge Ads tools via...

All available Goolge Ads tools via...

X (twitter)

X (twitter)

X (twitter)

All available X tools via...

All available X tools via...

All available X tools via...

Github

Github

Github

All available Github tools via...

All available Github tools via...

All available Github tools via...

Notion

Notion

Notion

All available Notion tools via...

All available Notion tools via...

All available Notion tools via...

Slack

Slack

Slack

All available Slack tools via...

All available Slack tools via...

All available Slack tools via...

Firecrawl

Firecrawl

Firecrawl

All available Firecrawl tools via...

All available Firecrawl tools via...

All available Firecrawl tools via...

753 integrations are available for loadouts.

753 integrations are available for loadouts.

753 integrations are available for loadouts.

Plug your entire stack into your AI agents.

Plug your entire stack into your AI agents.

Plug your entire stack into your AI agents.

Skip the integration headache. Plug 750+ tools into Claude Code, Codex, and OpenClaw in one go, and let your agents execute today.

Skip the integration headache. Plug 750+ tools into Claude Code, Codex, and OpenClaw in one go, and let your agents execute today.