This is super annoying. When any agent is running, multiple (sometimes 20+) “open with” windows pop up, this is probably source code you don’t want to reveal to users. I clicked open with Notepad
Steps to Reproduce
Using any agent to make an edit.
Expected Behavior
Not be spammed with popups. This only started a few days ago
Hey, thanks for the report. Good news, this isn’t a Cursor source code leak. Notepad is just showing the contents of a .sh hook script that Windows can’t run natively, so you get the Open with dialog. When the agent makes edits, the hook fires on every file change, which is why you see 20+ windows.
Almost always this is caused by a plugin that registers a .sh hook. Common culprits are Claude Code plugins like Superpowers or Ralph Loop, or cursor-public plugins. Here’s how to check:
Open Cursor Settings → Hooks and see how many hooks are configured. Often there are hooks you didn’t add manually.
Check for .sh hooks in .cursor/hooks.json in your project, ~/.cursor/hooks.json, and plugin caches like ~/.claude/plugins/cache/... and ~/.cursor/plugins/cache/cursor-public/....
Remove or disable the offending plugin, or rewrite the hook to use bash "<script>.sh" or a .ps1 wrapper.
This is a known limitation on our side. On Windows, hook commands that are just a bare .sh path get routed through the OS file association. We’re tracking an issue for it, but I can’t share an exact ETA for a fix yet. Let me know if the workaround helped.