I have a gitignored path that i use to save external repos to let Cursor easily get source references and docs.
I’ve been using this trick for the past year and always worked fine.
The trick is to gitignore a path and then use .cursorignore to un-ignore the same path, so the path is ignored by git but theorically cursor should not ignore it.
Today i’ve noticed that all folder wide tool calls are returning 0 results.
Thanks for the detailed report! The agent’s rg/glob tools respect .gitignore directly, and .cursorignore negation patterns may not fully override that for these terminal-based tools - even though negation works for other Cursor features like Tab, semantic search, and @ mentions. Since you mentioned this worked before, I’ve shared this with the team as a possible regression.
In the meantime, a couple of alternative approaches that should work well for your use case:
Add as a workspace folder: Instead of placing external repos inside your gitignored path, use File > Add Folder to Workspace to add the external repo directory separately. This way it’s a proper workspace root and won’t be subject to your project’s .gitignore rules at all.
Clone outside your project: Place the reference repos somewhere outside your project tree (e.g., a sibling directory or /tmp), then add that folder to your workspace using the method above. This keeps your project clean while giving the agent full directory-wide search capability over those reference sources.
Either approach avoids the gitignore/cursorignore conflict entirely. More on ignore file behavior here: Ignore Files docs
In 2.5.17 (7b98dcb824ea96c9c62362a5e80dbf0d1aae4770), I’ve found
Semantic search tool respects .cursorignore globs
Grep tool does not respect .cursorignore globs
Adding a glob to a .ignore file seems to work correctly for both the grep tool and rg in agent terminal. So files can be un-ignored via a .ignore file.