Skip to content

[Windows] Codex Desktop spawns hundreds of lingering taskkill.exe processes during agent work and freezes the OS #34579

Open

Description

@Sage-tap

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

  1. Launch Codex Desktop on Windows.
  2. Open a Git-backed local workspace.
  3. Start ordinary agent work that runs local shell/tool commands.
  4. Keep the Diff/Review panel closed.
  5. Sample live taskkill.exe processes:
    Get-Process taskkill -ErrorAction SilentlyContinue |
      Select-Object Id, StartTime, CPU, Responding
  6. Observe a rapid burst of hundreds of simultaneously alive taskkill.exe processes.

The issue is bursty and closely correlated with starting agent work.

Observed evidence

Snapshot 1

At 00:40:19:

  • 321 simultaneously alive taskkill.exe processes
  • 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.exe processes;
  • 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

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.

Activity

  1. added
    bug
    app
    windows-os
    app-server
    on Jul 21, 2026
  2. suiyuebaobao commented on Jul 22, 2026

    @suiyuebaobao

    The hundreds of lingering taskkill.exe processes and OS freeze here are very close to the downstream behavior I measured. In my reproduction, repeated desktop Git refreshes were upstream, so this workaround is worth testing if the same parent chain is present.

    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 new git.exe and 137 new taskkill.exe processes 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. If the process storm in this issue has a different upstream cause, this may not apply. 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.

  3. paper-tei commented on Jul 22, 2026

    @paper-tei

    是的,我也遇到了这个问题

  4. BJDubb commented on Jul 22, 2026

    @BJDubb

    +1
    Is causing my whole computer to lockup for a few seconds every few minutes.

    ChatGPT Desktop: 26.715.21425 / 150.0.7871.124

    Image
  5. leibu777 commented on Jul 23, 2026

    @leibu777

    same ,

  6. XZXZZX-Ai commented on Jul 23, 2026

    @XZXZZX-Ai

    Independent reproduction on another Windows machine

    I can independently confirm the same persistent taskkill.exe / conhost.exe growth during ordinary local tool execution.

    Environment

    • Codex Desktop package: OpenAI.Codex_26.715.10079.0_x64__2p2nqsd0c76g0
    • Windows: 25H2, build 26200.8875, x64
    • Native Windows workspace

    Observed behavior

    • In the most affected process snapshot, approximately 470 taskkill.exe and 477 conhost.exe processes were alive.
    • The inspected taskkill.exe processes were direct children of the Codex Desktop ChatGPT.exe process.
    • Representative sanitized command line: C:\Windows\System32\taskkill.exe /pid <pid> /t /f
    • The referenced target PIDs were no longer alive when inspected, while the corresponding taskkill.exe processes remained running.
    • Fully exiting and relaunching Codex cleared the accumulated processes and returned the process tree close to its normal baseline.
    • After one short read-only local tool call in the restarted session, the counts rapidly increased again to approximately 83 taskkill.exe and 90 conhost.exe processes and did not promptly return to baseline.

    This confirms the behavior on a second Windows 25H2 / Codex Desktop 26.715 environment. I am reporting only the observed process-lifecycle behavior and am not claiming a specific source-level root cause. I can provide additional sanitized timestamps, parent/child relationships, and command-line samples if maintainers request a preferred format.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    appapp-serverbugperformancewindows-os

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions