# Codex Windows App: tray Exit leaves residual processes; relaunch can return a broken frame/shadow-only window

**URL:** <https://community.openai.com/t/codex-windows-app-tray-exit-leaves-residual-processes-relaunch-can-return-a-broken-frame-shadow-only-window/1380171>\
**Category:** Codex\
**Created:** [May 1, 2026, 9:21pm UTC](https://community.openai.com/t/codex-windows-app-tray-exit-leaves-residual-processes-relaunch-can-return-a-broken-frame-shadow-only-window/1380171 "2026-05-01T21:21:24Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![aekiori](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/aekiori/32/738441_2.png) [@aekiori](https://community.openai.com/u/aekiori)\
**Post date:** [May 1, 2026, 9:21pm UTC](https://community.openai.com/t/codex-windows-app-tray-exit-leaves-residual-processes-relaunch-can-return-a-broken-frame-shadow-only-window/1380171/1 "2026-05-01T21:21:25Z")

</div>

Hi,

I think this is related to a few existing Windows Codex exit / relaunch reports, but I was able to dig a bit deeper into what seems to be happening.

* * *

## Related issues

- [Codex Windows App – UI closes but background processes remain, blocking relaunch](https://community.openai.com/t/codex-windows-app-ui-closes-but-background-processes-remain-blocking-relaunch/1379095)
- [Codex Windows App – Cannot Exit](https://community.openai.com/t/codex-windows-app-cannot-exit/1377981)
- [How does one quit the Codex application on Windows?](https://community.openai.com/t/how-does-one-quit-the-codex-application-on-windows/1375813)

Those reports already suggest that Codex on Windows does not always exit cleanly.  
In my case, I think I was able to narrow it down further with ProcMon.

* * *

## Summary

Sometimes after right-clicking the Codex tray icon and choosing Exit, Codex does not fully terminate.  
If I relaunch it in that residual state, the app can come back in a broken UI state — the outer window frame / shadow appears, but the inner renderer does not initialize properly.

Force-killing the remaining `Codex.exe` processes restores normal startup.

* * *

## TL;DR

- Tray Exit does not always terminate all Codex processes
- Leftover `Codex.exe` processes can remain running in the background
- Relaunch starts a new `Codex.exe` process that exits quickly with status 0
- Control seems to hand off / attach to the leftover instance
- If that leftover instance is already in a bad state, the UI returns as a broken frame/shadow-only window
- Killing all `Codex.exe` processes fixes it

* * *

## Symptoms

What I observed:

- Right-click tray icon → Exit does not always fully terminate Codex
- Multiple `Codex.exe` processes can remain visible in Task Manager
- Relaunching Codex in that residual state can produce a broken frame/shadow-only window
- Force-killing the remaining `Codex.exe` processes restores normal startup

* * *

## Possible trigger

I cannot reproduce it reliably with very light use.  
It seems much more likely after longer / heavier sessions.

My current working theory:

```auto
heavy / long session
→ incomplete tray Exit
→ residual processes remain
→ relaunch attaches to broken residual instance
→ UI comes back corrupted

```

* * *

## ProcMon findings

I recorded one bad relaunch case with Process Monitor.

### Residual processes remained alive after tray Exit

The following `Codex.exe` PIDs remained alive after Exit:

```auto
6036 / 2304 / 3332 / 1420

```

These were not ghost entries — they kept emitting `Process Profiling` events in ProcMon.

### Residual processes were still doing real work

- PID 1420 kept generating TCP/UDP traffic (`host.docker.internal ...`)
- PID 6036 kept accessing and writing under `C:\Users\<user>\AppData\Local\Packages\OpenAI.Codex_...`

So this was not just “the UI is closed but stale process names remain.”  
Actual background activity continued after Exit.

### Relaunch started a new process that exited cleanly

```auto
2:01:48.3635698 Codex.exe 9536 Process Start
2:01:49.0226769 Codex.exe 9536 Process Exit (Exit Status: 0)

```

The new process exited in about 0.66 seconds with status 0, so this does not look like an outright crash. It looks more like the app detected an existing instance and exited along its normal path.

* * *

## Working theory

This looks like a **single-instance / lifecycle bug**.

Codex appears to try to reuse or attach to an already-running instance on relaunch.  
The problem is that after some tray Exit cases, the old instance is not fully cleaned up.  
If that residual instance is already in a bad state, the relaunched UI does not initialize properly and comes back as a broken frame/shadow-only window.

Compared to the earlier reports above, the additional things I was able to confirm:

- The old processes really do remain alive after Exit
- They continue doing real background work
- Relaunch creates a new process, but that process exits normally instead of crashing
- This makes it look more like a **failed handoff / attach to a bad leftover instance**

* * *

## Question

Has anyone else seen this on Windows? Specifically:

- `Codex.exe` processes remaining after tray Exit
- Relaunch attaching to an existing instance instead of starting clean
- Broken frame/shadow-only UI on relaunch
- Higher repro rate after heavy / long sessions

If needed, I can also share screenshots and the relevant ProcMon excerpts.

---

<div class="post-metadata">

**Author:** ![OpenAI\_Support](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/openai_support/32/561845_2.png) [@OpenAI\_Support](https://community.openai.com/u/OpenAI_Support)\
**Post date:** [May 5, 2026, 6:22pm UTC](https://community.openai.com/t/codex-windows-app-tray-exit-leaves-residual-processes-relaunch-can-return-a-broken-frame-shadow-only-window/1380171/2 "2026-05-05T18:22:50Z")

</div>

Hey @aekiori! Really appreciate the clear write-up. If you’re able to add a screenshot of what you’re seeing, that’d be really helpful while we take a closer look on our end. We’ll update here once we have more to share.

- Sunny

---

<div class="post-metadata">

**Author:** ![aekiori](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/aekiori/32/738441_2.png) [@aekiori](https://community.openai.com/u/aekiori)\
**Post date:** [May 5, 2026, 6:48pm UTC](https://community.openai.com/t/codex-windows-app-tray-exit-leaves-residual-processes-relaunch-can-return-a-broken-frame-shadow-only-window/1380171/3 "2026-05-05T18:48:07Z")

</div>

![image](https://us1.discourse-cdn.com/openai1/original/4X/7/3/a/73ae6aad9eabd186ba652a0b672f83418c7165b1.png)

Thank you. I’ve attached the screenshots here.

---

<div class="post-metadata">

**Author:** ![aekiori](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/aekiori/32/738441_2.png) [@aekiori](https://community.openai.com/u/aekiori)\
**Post date:** [May 5, 2026, 6:48pm UTC](https://community.openai.com/t/codex-windows-app-tray-exit-leaves-residual-processes-relaunch-can-return-a-broken-frame-shadow-only-window/1380171/4 "2026-05-05T18:48:47Z")

</div>

![image](https://us1.discourse-cdn.com/openai1/original/4X/9/9/e/99e111f3690d38450d060bee9002d895585eb9b3.png)

---

<div class="post-metadata">

**Author:** ![OpenAI\_Support](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/openai_support/32/561845_2.png) [@OpenAI\_Support](https://community.openai.com/u/OpenAI_Support)\
**Post date:** [September 21, 2026, 11:18pm UTC](https://community.openai.com/t/codex-windows-app-tray-exit-leaves-residual-processes-relaunch-can-return-a-broken-frame-shadow-only-window/1380171/5 "2026-09-21T23:18:28Z")

</div>

Hi @aekiori, thanks for the detailed report! The current Windows update includes a shutdown fix that may help here. Please update through Microsoft Store, save your work and let tasks finish, then choose tray Exit. Wait 15 seconds before reopening. If Codex processes remain or the frame-only window returns, send feedback once you can reopen and share the app version and session ID.

-V
