codex - 💡(How to fix) Fix Windows: App does not fully exit on window close (X) + UI hit-testing issue in sidebar ("New Chat") [2 comments, 3 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openai/codex#17322Fetched 2026-04-11 06:17:46
View on GitHub
Comments
2
Participants
3
Timeline
9
Reactions
2
Timeline (top)
labeled ×3commented ×2cross-referenced ×2marked_as_duplicate ×1

Fix Action

Fix / Workaround

Workaround:

RAW_BUFFERClick to expand / collapse

Environment:

  • OS: Windows 11 x64
  • Codex Desktop Version: 26.406.3494.0
  • Installation type: Standard Windows installer
  • CLI: Codex CLI works нормально (no issues)

Summary: There are two related issues in the Windows desktop app:

  1. Closing the application via the window close button (X) does not terminate the app completely — multiple background processes remain running, preventing relaunch.
  2. UI hit-testing is broken in the sidebar: hover and click behavior on the "New Chat" button is inconsistent and appears to pass through the element.

Issue 1: App does not exit when clicking "X"

Steps to reproduce:

  1. Launch Codex desktop app
  2. Click the window close button (X) in the top-right corner

Expected behavior: Application fully terminates (all processes exit)

Actual behavior:

  • The window closes
  • ~5–6 Codex processes remain running in Task Manager
  • Relaunching Codex fails (no window appears)

Workaround:

  • Using File → Exit properly terminates all processes
  • Alternatively, manually killing processes (taskkill /IM codex.exe /F) allows relaunch

Notes: This suggests that the window close event does not trigger full application shutdown (app.quit() not called or not propagated).


Issue 2: Sidebar UI interaction bug ("New Chat")

Steps to reproduce:

  1. Open Codex app
  2. Move mouse over "New Chat" button in the sidebar

Expected behavior:

  • Hover state activates
  • Click triggers new chat

Actual behavior:

  • Hover state does not activate consistently
  • Click sometimes behaves as if it targets the window behind the UI
  • Double-click behaves like interacting with the window title bar (not the button)

Additional observations:

  • Behavior resembles broken hit-testing or incorrect input layer mapping
  • Feels like pointer events are not correctly bound to the UI element

Regression

This behavior did not occur ~1 week ago. The issue appeared after an update (current version: 26.406.3494.0).


Additional observations

  • Issue 1 and Issue 2 may be related (renderer / event loop / Electron lifecycle inconsistency)
  • Previous UI glitches (hover issues) were observed before the shutdown problem appeared
  • Codex CLI works correctly → issue isolated to desktop runtime (Electron layer)

Impact

  • Prevents normal app usage (cannot reliably restart app)
  • Requires manual process cleanup
  • UI interaction becomes unreliable

Suggested areas to investigate

  • Handling of BrowserWindow close event
  • app.on('window-all-closed') behavior on Windows
  • Renderer hit-testing / pointer events
  • GPU / compositing layer issues (optional: test with --disable-gpu)

extent analysis

TL;DR

Investigate and adjust the handling of the BrowserWindow close event and app.on('window-all-closed') behavior to ensure proper application termination and fix UI hit-testing issues.

Guidance

  • Review the Electron documentation for BrowserWindow close events and app.on('window-all-closed') to ensure correct implementation.
  • Verify that app.quit() is called when the window close button is clicked, and that it properly terminates all processes.
  • Investigate the renderer hit-testing and pointer events to resolve the inconsistent hover and click behavior on the "New Chat" button.
  • Consider testing with --disable-gpu to rule out GPU or compositing layer issues.

Example

No specific code example is provided due to the lack of explicit code in the issue, but reviewing the Electron API for BrowserWindow and app events is recommended.

Notes

The issues may be related to changes in the Electron lifecycle or event loop handling, and resolving one issue may affect the other. The fact that the CLI works correctly suggests that the issue is isolated to the desktop runtime (Electron layer).

Recommendation

Apply a workaround by using File → Exit to properly terminate the application until the root cause is identified and fixed, as this ensures all processes are exited and allows for relaunching the app.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING