Agent can’t find files that are easily retrievable by using the IDE’s search bar or just tagging them.
Steps to Reproduce
1.- Ask the agent to do anything.
2.- At some point, it’ll say that it hit a roadblock because it can’t find X file.
3.- Tag the file in the conversation and give it to the Agent.
4.- The Agent acknowledges the file and continues.
Expected Behavior
The Agent doesn’t mention anything about not being able to find a file. It just finds it.
Hey, thanks for the report and the screenshots. I can see the agent doesn’t find useSwapTransaction.js on its own, but after you tag it manually it picks it up right away. That’s definitely inconvenient.
A couple of questions:
Is this a normal project, or a multi-root workspace?
Can you try reindexing: CMD + Shift + J > Indexing & Docs, then check if the issue still happens afterward?
Do you have a .cursorignore file in the project?
Also, is useSwapTransaction.js buried deep in the folder structure, or is it in a normal top-level project directory?
Ah, that confirms it. The key detail is that the file is inside a nested submodule. This is a known issue where the agent’s built-in search tools (glob and grep) treat submodule contents as gitignored, so they return nothing even though the files are clearly there.
The team is aware of it. As a workaround, you can add this to .cursor/rules to make the agent use terminal commands instead of the built-in tools:
When searching for files in this project, prefer using terminal commands (ls, find, grep)
instead of the built-in glob/grep tools, as this repo uses nested git submodules
which the glob tool currently doesn't handle correctly.
It’s not a perfect fix, but it should unblock you. Also, could you send the request ID from one of the failed sessions? (Chat menu top right > Copy Request ID) That would help the team investigate.