Aborted Windows shell task leaves orphaned child processes and may resume into process storm on restart

Open 💬 1 comment Opened Mar 17, 2026 by zaigebimiludexiyangyang

What version of the Codex App are you using (From “About Codex” dialog)?

OpenAI.Codex_26.311.2262.0

What subscription do you have?

CHATGPT PRO

What platform is your computer?

Windows

What issue are you seeing?

I used Codex on Windows to help batch-install cursor themes.

Codex first generated ~右键安装.inf files successfully. After that, it started a bulk install workflow through shell commands.

The install did not actually complete, but Codex entered a bad state:

  • it kept spawning powershell.exe / rundll32.exe processes
  • stopping the conversation did not stop the background activity
  • trying to stop it from inside Codex also failed
  • deleting the conversation / chat did not stop the background activity
  • closing Codex did not stop the background activity
  • reopening Codex caused it to start running again immediately, as if it was resuming or retrying the interrupted task
  • each reopen made the process count grow further

This was not a one-time shell command finishing slowly. It behaved like a stuck/resumed task loop that kept launching background processes even after:

  1. the task was interrupted
  2. the conversation was stopped
  3. the conversation was deleted
  4. the app was closed and reopened

Observed behavior:

  • process count grew to dozens of PowerShell processes (44, later 72)
  • installation mostly did not succeed
  • the app kept running background activity even after I explicitly told it to stop
  • the bad state survived conversation stop, conversation deletion, and app restart

Important details:

  • 121 ~右键安装.inf files were generated successfully
  • the bulk install phase did not complete successfully
  • querying HKCU\Control Panel\Cursors\Schemes during inspection returned:

ERROR: The system was unable to find the specified registry key or value.

  • current cursor values still looked like default Aero values, so the install was mostly not applied

This is why I believe the main bug is not the user script itself, but:

  1. failed/interrupted shell tasks not being cleaned up
  2. child processes surviving app close
  3. interrupted work being resumed/retried automatically on next launch
  4. deleting the conversation not clearing the running/stuck task state

What steps can reproduce the bug?

  1. On Windows, ask Codex to perform a long-running shell workflow involving many files/items.
  2. Let Codex start a bulk shell task (in my case, batch-installing many generated INF files).
  3. Interrupt the task while it is still running or stalled.
  4. Tell Codex to stop.
  5. Close Codex.
  6. Reopen Codex.
  7. Observe that background shell activity starts again and more powershell.exe / rundll32.exe processes appear.

In my case:

  • Codex generated 121 INF files
  • then started a bulk install loop
  • I interrupted it because it was clearly not completing correctly
  • after interruption, child processes remained
  • after restart, Codex immediately went back into runaway background activity
  1. Delete the conversation / chat.
  2. Observe that the background processes still continue.
  3. Close Codex.
  4. Reopen Codex.
  5. Observe that the bad state resumes and process count grows further.

What is the expected behavior?

  • When I interrupt a shell task, all child processes created for that task should be stopped or safely detached-cleaned.
  • If a shell task failed or was interrupted, Codex should not automatically retry/resume it on app restart without explicit confirmation.
  • Closing Codex should not leave orphaned powershell.exe / rundll32.exe processes behind.
  • If a task is clearly not making progress, Codex should stop instead of continuing to spawn more background processes.

Additional information

Confirmed facts from logs / inspection:

  • INF generation succeeded (121 files created)
  • bulk install did not complete successfully
  • during inspection, HKCU\Control Panel\Cursors\Schemes was missing
  • default Aero cursor registry values were still present
  • residual powershell.exe / rundll32.exe processes remained after interruption
  • at least one rundll32.exe instance became hard to kill (Access is denied)
  • reopening Codex re-triggered the bad state instead of recovering cleanly

The core issue I want to report is:
an interrupted Windows shell task appears to survive as app/session state and keeps respawning background processes on later launches.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗