False Warning for Hook Script Path in `.cursor/` Directory

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

Cursor IDE shows a false warning (red text with warning icon) in the hooks configuration UI when the hook script path points to a file inside the .cursor/ directory, even though the script executes successfully.

Steps to Reproduce

  1. Create a hook script at .cursor/hooks/format.sh with executable permissions
  2. Configure hooks.json with the path ./.cursor/hooks/format.sh:
    {
      "version": 1,
      "hooks": {
        "afterFileEdit": [{ "command": "./.cursor/hooks/format.sh" }]
      }
    }
    
  3. Observe the hooks configuration UI showing a red warning icon next to the path

Screenshots / Screen Recordings

Operating System

MacOS

Current Cursor Version (Menu → About Cursor → Copy)

  • Cursor Version: 2.1.50

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey, thanks for the report. Could you update to version 2.2? We’ve made many improvements in this update and fixed a lot of bugs.

You can download it here: Download · Cursor
Or update via Help > Check for updates

Please check if the issue persists on the new version and let me know. If the bug remains, I’ll pass it to the engineering team right away.

This topic was automatically closed 22 days after the last reply. New replies are no longer allowed.