Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
When setting "window.confirmBeforeClose": "always" in settings.json, confirming window close shows a VSCode-style notification warning indicating Illegal state: service accessor is only valid during the invocation of its target method.
Also, the close confirmation popup is shown even if the property is not set, although this case does not cause the error and does not prevent quitting Cursor.
This affects both the classic IDE and Cursor Glass, although Glass is not showing any warning anywhere - and neither one of them have any error thrown inside of their devtools and logged in the console.
Stack trace is accessible by going into the “Sources” tab and checking “Pause on caught exceptions”, which will show the “Illegal state” error, after a couple of seemingly unrelated ones.
In most cases:
- If a Glass window is open, you have to force quit the app to close the window, and to quit Cursor.
- If an editor window is open, you can first close that window, THEN quit the app, which will work as expected.
- If both Glass and regular editor windows are opened, the regular editor window will close, but the Glass won’t without any feedback or error anywhere. Cursor will NOT quit.
Also, if a Glass window was opened the last time you had to force quit the app, it will reopen automatically on next launch, and you still won’t be able to close it AT ALL.
The only way I found to get rid of it was to launch cursor using cursor --classic in the terminal.
Has been happening for a while and I couldn’t figure out why. Both Stable and Dev channel. Also happens with extensions disabled, does not happen on regular VSCode.
Steps to Reproduce
Set window.confirmBeforeClose to always and try quitting Cursor Editor via Cmd+Q.
Open a Cursor Glass window, try quitting and closing the window - the traffic light button shouldn’t work now.
Expected Behavior
Cursor should quit.
Screenshots / Screen Recordings
Operating System
MacOS
Version Information
Version: 3.2.0-pre.35.patch.0
Commit: d1a36a628792b1e615917859916162ea8a2f7e10
Date: 2026-04-17T01:50:29.007Z
Layout: editor
Browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Cursor/3.2.0-pre.35.patch.0 Chrome/142.0.7444.265 Electron/39.8.1 Safari/537.36
Does this stop you from using Cursor
Sometimes - I can sometimes use Cursor