Glass Agents window shutdown deadlock when window.confirmBeforeClose is "always"

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

Environment
Cursor version: 3.10.17 (stable)
OS: Windows 10/11 (build 10.0.26200)
Layout: Agents Window (Glass) vs Editor Window (Legacy IDE)
Relevant setting: “window.confirmBeforeClose”: “always” in settings.json
Summary
When window.confirmBeforeClose is set to “always”, the Agents Window (Glass layout) cannot be closed. Clicking the window X button does nothing. File → Quit shows the quit confirmation dialog, but after clicking OK the application still does not exit. The only workaround is to kill Cursor.exe via Task Manager.

The Legacy Editor Window works correctly with the same setting — close confirmation and quit behave as expected.

Changing the setting to “never” immediately fixes the issue on the Agents Window.

Steps to Reproduce
Set in settings.json:
“window.confirmBeforeClose”: “always”
Open the Agents Window (Glass layout).
Try to close via the X button → no response (no dialog, window stays open).
Try File → Quit → confirmation dialog appears; click OK → window/app still does not close.
Kill the process via Task Manager.
Control test: With the same setting, open the Editor Window (Legacy IDE) and close via X or File → Quit → works normally.

Expected Behavior
X click or File → Quit should either show a confirmation dialog and then close on confirm, or cancel on dismiss — same as the Editor Window.
Shutdown should complete after the user confirms quit.
Actual Behavior
X: no visible response.
File → Quit → dialog shows, user confirms, but shutdown never completes.
Process must be force-killed.
Workaround
Set “window.confirmBeforeClose”: “never” (or avoid the standalone Agents Window and use Editor with --classic).

Log Evidence
From %APPDATA%\Cursor\logs<session>\window1_wb0\renderer.log (Glass / Agents window), on every close attempt:

[warning] [lifecycle] onBeforeShutdown is taking a long time, pending operations: veto.confirmBeforeCloseOrStreamingChat
[warning] [lifecycle] onBeforeShutdown is taking a long time, pending operations: workspaceCollection.beforeShutdown
The shutdown veto veto.confirmBeforeCloseOrStreamingChat never resolves — no subsequent Shutdown was prevented or successful shutdown log.

On the Editor Window (window2\renderer.log) with the same setting, the veto completes normally:

[info] [lifecycle]: Shutdown was prevented (id: veto.confirmBeforeCloseOrStreamingChat)
Reproduced across multiple sessions on 2026-07-07 (e.g. 20260707T104818, 20260707T105430, 20260707T110425, 20260707T110702).

Glass window is identifiable in logs by:

[info] [CursorExtensionIsolationService] Extension isolation is disabled (forced disabled in glass mode)
Impact
Users who rely on window.confirmBeforeClose: “always” to prevent accidental window close cannot use the Agents Window without force-killing the app. This forces a choice between safety (confirm before close) and being able to exit the Agents UI.

Suggested Fix Area
Glass layout lifecycle / confirmBeforeCloseOrStreamingChat veto handler — confirmation UI or callback may not be shown or resolved in Glass mode when window.confirmBeforeClose is “always”.

Steps to Reproduce

Set in settings.json:
“window.confirmBeforeClose”: “always”
Open the Agents Window (Glass layout).
Try to close via the X button → no response (no dialog, window stays open).
Try File → Quit → confirmation dialog appears; click OK → window/app still does not close.
Kill the process via Task Manager.
Control test: With the same setting, open the Editor Window (Legacy IDE) and close via X or File → Quit → works normally.

Operating System

Windows 10/11

Version Information

CURSOR 3.10

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey, thanks for the detailed report. The logs and the control test with the Editor Window help a lot.

Confirmed, this is a bug on our side. In the Agents Window Glass, with window.confirmBeforeClose: "always", the shutdown veto never resolves, so the window gets stuck when closing. In the legacy Editor Window, the same flow works fine, which your logs show. I’ve filed an internal report, but I can’t share an ETA for the fix yet.

For now, the working workaround is the one you already found: "window.confirmBeforeClose": "never" (this is the desktop default). As an alternative, you can use the Editor Window or cursor --classic.

I’ll post an update in the thread as soon as we have one.