Cursor Agent repeatedly spawns hundreds of external Git Bash/MSYS2 terminals on Windows

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:

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.