BUG: Codex for Windows does not fully exit; old process tree remains alive after app close / Where can I report it? #14758
Replies: 2 comments 1 reply
-
|
This is a discussion forum. If you'd like to report a bug, please use the issue tracker in this project. I think this is a known issue, so do a search before opening a new bug report. |
Beta Was this translation helpful? Give feedback.
-
|
I've been seeing the same issue and was able to dig a bit deeper with ProcMon. Posting here in case it helps. Symptoms
Possible trigger Cannot reproduce reliably with light use. Seems much more likely after longer / heavier sessions. ProcMon findings Residual These were not ghost entries — they kept emitting
On relaunch: The new process exits in ~0.66s with status 0 — looks like intentional handoff/attach to the existing instance rather than a crash. Working theory Codex appears to be single-instance and tries to attach to an already-running instance on relaunch. If that leftover instance is in a bad state, the UI comes back corrupted (frame/shadow only). So the flow seems to be: |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Short summary:
Codex for Windows does not always terminate cleanly when the app window is closed. After closing the app, parts of the previous Codex process tree can remain alive in the background, especially powershell.exe and conhost.exe child processes started by Codex. Launching Codex again can then create a second full Codex instance while the old one is still running. I attached a process-monitor log with timestamps, parent/child relationships, and the overlapping old/new process trees.
Product:
Codex for Windows desktop app
Environment:
C:\Program Files\WindowsApps\OpenAI.Codex_26.311.2262.0_x64__2p2nqsd0c76g0\app\Codex.exe
C:\Users\xxxxxx\AppData\Roaming\Codex
Summary:
When closing Codex on Windows, the app does not always terminate cleanly. A previous Codex instance can remain alive in the background, including child terminal-related processes such as powershell.exe and conhost.exe. Starting Codex again can create a second full Codex process tree while the old one is still running.
Impact:
Reproducibility:
Observed multiple times
Steps to reproduce:
Expected result:
Closing Codex should terminate the full process tree for that session, including:
Actual result:
After closing Codex, the previous session may remain partially or fully alive. On relaunch, a second Codex instance starts while processes from the prior instance are still present.
Evidence from attached log:
The attached process-monitor log shows that an older Codex session remained alive when a newer session started.
Relevant findings:
At 2026-03-15 19:08:55 a Codex session starts with main process:
Codex.exe PID 26964 PPID 8452
Child processes associated with that session include:
Codex.exe PID 22180 PPID 26964
Codex.exe PID 24116 PPID 26964
Codex.exe PID 27000 PPID 26964
powershell.exe PID 28076 PPID 26964
powershell.exe PID 19484 PPID 26964
conhost.exe PID 6912 PPID 26964
conhost.exe PID 10848 PPID 26964
Later, at 2026-03-15 19:11:35, another Codex session starts with main process:
Codex.exe PID 3840 PPID 8452
Child processes associated with the newer session include:
Codex.exe PID 6456 PPID 3840
Codex.exe PID 7688 PPID 3840
Codex.exe PID 8792 PPID 3840
Codex.exe PID 18744 PPID 3840
codex.exe PID 20116 PPID 3840
powershell.exe PID 27148 PPID 3840
conhost.exe PID 16252 PPID 3840
At 2026-03-15 19:12:00 both sessions are still present at the same time:
Older session still alive:
Codex.exe 26964
Codex.exe 22180
Codex.exe 24116
Codex.exe 27000
powershell.exe 28076
powershell.exe 19484
conhost.exe 6912
conhost.exe 10848
Newer session also alive:
Codex.exe 3840
Codex.exe 6456
Codex.exe 7688
Codex.exe 8792
Codex.exe 18744
codex.exe 20116
powershell.exe 27148
conhost.exe 16252
Observed behavior suggests:
Notes:
Attachment:
Request:
Please investigate Codex shutdown behavior on Windows, especially cleanup of:
Beta Was this translation helpful? Give feedback.
All reactions