Agent can't find files

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

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.

Screenshots / Screen Recordings

Operating System

MacOS

Version Information

Version: 2.6.11
VSCode Version: 1.105.1
Commit: 8c95649f251a168cc4bb34c89531fae7db4bd990
Date: 2026-03-03T18:57:48.001Z
Build Type: Stable
Release Track: Default
Electron: 39.6.0
Chromium: 142.0.7444.265
Node.js: 22.22.0
V8: 14.2.231.22-electron.0
OS: Darwin x64 24.6.0

Does this stop you from using Cursor

Sometimes - I can sometimes use Cursor

1 Like

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:

  1. Is this a normal project, or a multi-root workspace?
  2. Can you try reindexing: CMD + Shift + J > Indexing & Docs, then check if the issue still happens afterward?
  3. 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?

Let me know how it goes after the reindex.

I’ll re-index and see if the agent flags this again. As for your questions:

Is this a normal project, or a multi-root workspace?

The missing file is within a nested submodule.

Do you have a .cursorignore file in the project?

I don’t

1 Like

Nope. It still can’t find things, even with a new index.

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 same issue was reported here: Agent grep / glob returning zero results

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.

2 Likes

There you go: 757ed50f-8cb8-4080-9d8a-ce261b476c8e

1 Like

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