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

Thanks for the screenshot, it shows the source of the issue. The deploy-on-aws config hook type postToolUse, path .cursor\plugins\cache\cursor-public\deploy-on-aws\..., is the one.

The confusing part is that even though it’s called “deploy-on-aws”, this hook isn’t tied to AWS in your project. postToolUse runs after every agent tool call, meaning after every file edit, no matter if the project uses AWS or not. That’s why it also triggers in new projects. And the path shown in the title of the external Git Bash windows from your first report ...\cursor-public\deploy-on-a... matches this hook exactly.

What to do now:

We’ve already reported the underlying issue on our side, the hook calling a .sh ends up going through Windows file associations. I can’t share an ETA for a fix yet. Let me know if the windows stop after you disable the plugin.