When clicking the close button (X), Cursor immediately closes without confirmation. This causes accidental closes when working on important code.
Please add an optional confirmation dialog: “Are you sure you want to close Cursor?” with Yes/No buttons.
Use case
Prevents losing unsaved work or accidentally closing during active coding sessions.
Additional context
This is a common feature in many IDEs and editors (VS Code has extensions for this, JetBrains IDEs have this built-in).
Additional context
Alt+F4 already shows a confirmation dialog when a terminal is running,
but clicking the close button (X) does not. The same confirmation
should apply to both close methods for consistency.
Hey, thanks for the feature request. Good news, you can enable this right now.
Open Settings, search for confirm before close, and set Window: Confirm Before Close to Always. Or add this to settings.json:
"window.confirmBeforeClose": "always"
After that, Cursor will ask for confirmation both when you close a window via the X button and when you quit the app.
A couple notes that already work by default: Cursor already warns you before closing if an agent is still running or a background terminal is active, and unsaved editors are restored on the next launch via hot exit.
Let me know if the setting doesn’t behave the way you expect.
Thanks Dean, the setting works. But the UI of the confirmation dialog
is different depending on how you close:
Alt+F4 shows a sleek dark-themed Cursor modal (see screenshot 1)
Close button (X) with this setting shows a basic Windows native dialog (see screenshot 2)
Can you make both use the same styled Cursor modal for consistency?
The Alt+F4 version looks much better.
Attach both screenshots. This is a UI polish request now, not a feature request.
Hey, thanks for coming back with details and screenshots. I can see the difference: closing via the X button shows the native Windows dialog, while Alt+F4 shows Cursor’s styled modal.
That’s correct. Right now those two close actions go through different dialogs, which is why they look different. I agree the styled modal looks better, and it makes sense for both paths to be consistent. I shared it with the team as a polish request. I can’t give a timeline yet, but if I get an update, I’ll reply here.