"Open with" windows opening when agent is running

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

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

Operating System

Windows 10/11

Version Information

IDE Version 3.10.20

Does this stop you from using Cursor

Sometimes - I can sometimes use Cursor

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:

  1. Open Cursor Settings → Hooks and see how many hooks are configured. Often there are hooks you didn’t add manually.
  2. 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/....
  3. Remove or disable the offending plugin, or rewrite the hook to use bash "<script>.sh" or a .ps1 wrapper.

In a related thread, a user confirmed that removing Superpowers and Ralph Loop completely stopped the popups: Windows "Select an app to open" dialog triggers when opening AI chat (.sh file handler issue)

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.