Hey, thanks for the detailed report. I can see the screenshot with dozens of Git Bash windows, all with the same title from .cursor\plugins\cache\cursor-public\deploy-on-a... and that’s the source.
What’s happening: one of the plugins (cursor-public, deploy-on-a...) registers a hook on every file edit (afterFileEdit), and the hook command points to a .sh script. On Windows, a raw .sh path doesn’t go through Cursor’s bundled shell, it goes through the system file association. Since you have Git for Windows installed, .sh is associated with bash --login -i "%1", so every hook run opens a new external Git Bash window. The hook triggers on every edit, so during generation you end up with hundreds. The terminal profile (PowerShell) doesn’t matter here, and Kill All Terminals won’t close them because they’re external processes.
How to fix it right now:
- Open Cursor Settings > Hooks and check the list of registered hooks. You’ll see a hook from
cursor-publicordeploy-on-a...pointing to a.sh. - Fastest option is to disable that plugin. The per-edit hook will stop firing and the windows will stop.
- If you need the plugin, wrap the hook in bash or use a thin
.ps1wrapper instead of calling the raw.sh. A ready PowerShell wrapper recipe is in this thread Windows "Select an app to open" dialog triggers when opening AI chat (.sh file handler issue) (post by @Emrah), and the general guide is here Hooks in Windows.
We know about this mechanism (hooks calling .sh via the OS file handler on Windows). I’ve reported your case with the external windows internally. I can’t share a timeline for a fix yet. Let me know which plugin was the culprit and whether the steps above helped.