.cursorrules don't apply to workspaces with multiple folders

Hi, thanks for reporting an issue with Cursor.

Before you report this, we’d appreciate if you can search this forum to see if this issue has already been reported.

If you have done so, please check this box.
on

Describe the Bug

When a .cursorrules file exists in the root of of workspace, Cursor doesn’t find/recognize the file. When the same folder is opened, not as a workspace, the rules are detected.

Steps to Reproduce

  1. Create a workspace file repro.code-workspace with the following details. Make sure to also create the folders.
{
  "folders": [
    {
      "path": "backend"
    },
    {
      "path": "frontend"
    },
    {
      "name": "root",
      "path": "."
    }
  ]
}
  1. Create a .cursorrules file
  2. File → Open Workspace from File… and select the repro.code-workspace file.
  3. Use the Cursor chat and see that the rules aren’t being used
  4. Open the root folder directly using File → Open Folder…
  5. Use the Cursor chat and see that rules are being used

Expected Behavior

Both the workspace and folder should use the same rules.

Operating System

MacOS

Current Cursor Version (Menu → About Cursor → Copy)

Version: 0.44.9
VSCode Version: 1.93.1
Commit: 316e524257c2ea23b755332b0a72c50cf23e1b00
Date: 2024-12-26T21:58:59.149Z
Electron: 30.5.1
Chromium: 124.0.6367.243
Node.js: 20.16.0
V8: 12.4.254.20-electron.0
OS: Darwin arm64 23.6.0

Additional Information

N/A

Does this stop you from using Cursor

No - Cursor works, but with this issue

3 Likes

I solved by adding following prompt in Rules for AI

Always include .cursorrules as a prompt when any .cursorrules found in workspace folder.