Rules in a symlinked subfolder (.mdc) are not followed (again)

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

Same as in the previous post: if you symlink to a folder with rules in it, they aren’t loaded

Steps to Reproduce

Symlink a directory with rules inside into .cursor/rules (e.g. ln -s ./my-rules .cursor/rules/shared).

Expected Behavior

Rules are loaded into context after reloading

Screenshots / Screen Recordings

Operating System

Windows 10/11
MacOS
Linux

Version Information

2.5.25 (User)

Does this stop you from using Cursor

No - Cursor works, but with this issue

Notes

This doesn’t happen if you symlink the rules directly in the base .cursor/rules folder, then they work as expected. It’s just for symlinked directories

1 Like

@Colin Can you please take a look? This is still broken

Thanks for the report @Bosco_Domingo_Benito!

I tried to reproduce this by creating a directory with .mdc rules and symlinking it into .cursor/rules/:

mkdir my-rules
# ... added .mdc files to my-rules/ ...
ln -s ../../my-rules .cursor/rules/shared

At first, the rules from the symlinked directory were not loaded. However, after a full window reload (Cmd+Shift+P / Ctrl+Shift+PDeveloper: Reload Window), the rules from the symlinked directory were correctly picked up.

Could you try that and let us know if that also resolves the issue? It seems like the file watcher may not detect newly added symlinked directories (and for that, we may want to log a bug), but a full reload triggers the rules discovery pipeline which does follow symlinks.

Yeah unfortunately that doesn’t work. For reference, here’s what my .cursor/rules looks like:

⚡ l .cursor/rules
lrwxrwxrwx 1 bosco bosco   64 Mar  3 19:48 brainstorming.mdc → ../../resources/AI_LLMs/rules/generated/cursor/brainstorming.mdc
lrwxrwxrwx 1 bosco bosco   34 Mar  2 14:36 context-health-check.mdc → generated/context-health-check.mdc
lrwxrwxrwx 1 bosco bosco   46 Feb 23 16:54 generated → ../../resources/AI_LLMs/rules/generated/cursor

Both individual rules work as expected, even though context-health-check.mdc symlinks to its own sibling which is itself a symlink! And yet, the rest in that symlinked dir are all not loaded, not even after a reload or restarting Cursor completely.

They are all valid rules, too, as I tested them by copying them all into .cursor/rules directly and they were successfully loaded then. Kinda stumped on this one. Could it be because of the name of the folder itself maybe? It’s definitely a valid symlink and the rules inside are too.

And a quick sanity check after reloading, fresh chat:

Happy to provide logs privately

Edit: it was indeed the name. Since I have a generated/ in my .gitignore it was silently ignoring these too. Damn I’m dumb. Well I hope this serves as a solution for anyone who may run into this issue in the future :joy:

1 Like