I am using Cursor on Windows 11 with 16 GB of RAM. My development work mainly involves PHP, Electron, and Python projects.
Every time I close Cursor, a dialog appears with the following message:
Closing the window is taking a bit longer…
The following operations are still running:
Composer Session End Hooks
The dialog remains visible until the process finishes or I click “Close Anyway.”
Is this expected behavior, a known bug, or possibly caused by an extension, configuration, or running process? Are there any recommended steps to identify what is triggering the Composer Session End Hooks during shutdown?
Hey, thanks for the detailed report and the screenshot. This isn’t a bug or a random extension. It’s how the Hooks feature works. You have a sessionEnd hook set up somewhere, and when you close Cursor it waits for that hook to finish. That’s why you see the message “Closing the window is taking a bit longer…”.
Where to look:
Cursor Settings > Hooks. There’s also a hook execution log there.
~/.cursor/hooks.json for user hooks and .cursor/hooks.json in your project
Installed plugins that register hooks
Claude Code settings at ~/.claude/settings.json. Cursor should pick these up, but in practice it’s more reliable to check .cursor/hooks.json directly.
How to remove the delay:
Remove or disable the sessionEnd hook you don’t need
Or lower its timeout, or speed up the script itself
On Windows, it’s better to use Node or PowerShell instead of .sh. Shell scripts via Git Bash start slowly, which causes the delay every time you close Cursor.
Quick workaround: just click Close Anyway
Most likely the hook came from a plugin or from your Claude config. Start with Cursor Settings > Hooks. Usually you can see right away what’s being launched. Let me know what you find.