Aborted Windows shell task leaves orphaned child processes and may resume into process storm on restart
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.exeprocesses - 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:
- the task was interrupted
- the conversation was stopped
- the conversation was deleted
- the app was closed and reopened
Observed behavior:
- process count grew to dozens of PowerShell processes (
44, later72) - 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~右键安装.inffiles were generated successfully- the bulk install phase did not complete successfully
- querying
HKCU\Control Panel\Cursors\Schemesduring 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:
- failed/interrupted shell tasks not being cleaned up
- child processes surviving app close
- interrupted work being resumed/retried automatically on next launch
- deleting the conversation not clearing the running/stuck task state
What steps can reproduce the bug?
- On Windows, ask Codex to perform a long-running shell workflow involving many files/items.
- Let Codex start a bulk shell task (in my case, batch-installing many generated INF files).
- Interrupt the task while it is still running or stalled.
- Tell Codex to stop.
- Close Codex.
- Reopen Codex.
- Observe that background shell activity starts again and more
powershell.exe/rundll32.exeprocesses appear.
In my case:
- Codex generated
121INF 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
- Delete the conversation / chat.
- Observe that the background processes still continue.
- Close Codex.
- Reopen Codex.
- 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.exeprocesses 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 (
121files created) - bulk install did not complete successfully
- during inspection,
HKCU\Control Panel\Cursors\Schemeswas missing - default Aero cursor registry values were still present
- residual
powershell.exe/rundll32.exeprocesses remained after interruption - at least one
rundll32.exeinstance 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.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗