Search tool not finding all instances of a searched term (Composer 1.5)

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

I asked Composer 1.5 to find all instances of a string (Searched term was --env-file).

It found only about about 60% of all instances.

I’m not using .cursorignore, and the files I expected to be found were NOT hidden by .gitignore .

I was able to find ALL instances when I used the built-in search (CTRL+SHIFT+F).

It seems the issue is with the tool that’s available to the models, I got the “Grepped term in dir” message, and it returned only the subset of results (see screenshot).

The workspace contains about 195 files tracked by git.

The problem is NOT related to which files are committed to git or untracked.

Steps to Reproduce

  1. Clone GitHub - JuroOravec/safe-ai-factory: Agentic Swarms for Engineering Teams: Spec-driven AI factory. Use with any agentic CLI. Language-agnostic. Safe by design. · GitHub
  2. Open it within Cursor
  3. Prompt Composer 1.5 in Ask mode to “find all instances of --env-file”

Expected Behavior

NOTE: I can’t upload multiple screenshots. But the searched term was present in 11 files total.

Screenshots / Screen Recordings

Operating System

MacOS

Version Information

Version: 2.6.13
VSCode Version: 1.105.1
Commit: 60faf7b51077ed1df1db718157bbfed740d2e160
Date: 2026-03-06T06:17:49.499Z
Build Type: Stable
Release Track: Early Access
Electron: 39.6.0
Chromium: 142.0.7444.265
Node.js: 22.22.0
V8: 14.2.231.22-electron.0
OS: Darwin x64 25.3.0

Additional Information

I’m noticing incidence of this went up over the last week. I don’t think it was an issue e.g. a month ago. Could be repo-specific, since I’m working on a single repo for the past 3 weeks.

Very annoying. I use Cursor because in the past it felt other tools were really at search & indexing capabilities. And a coding agent that updates only 50% of the files is no good.

Does this stop you from using Cursor

No - Cursor works, but with this issue

After a bit more prompting, Composer 1.5 made this suggestion as to why it might happen and how to obtian the list of matches that I see:


The extra matches are in files that my earlier Grep run did not cover. Running ripgrep directly returned 12 files, including these that were missing from the first result:

1. **`safe-ai-factory/CHANGELOG.md`**
2. **`safe-ai-factory/docs/agents/README.md`**
3. **`safe-ai-factory/docs/development/v0/swf-inner-loop.md`**
4. **`safe-ai-factory/docs/development/v0/swf-custom-agent.md`**
5. **`safe-ai-factory/src/orchestrator/loop.ts`**

Those match the areas you mentioned (docs/agents, docs/development, src/orchestrator/loop).

**Why the difference?**

The Grep tool in Cursor does not return the same results as a direct `rg` search. It likely uses:

- Extra excludes (e.g. a Cursor-specific `search.exclude`, `.cursorignore`, or similar)
- Different handling of nested `.git` folders
- Different default globs or ignore rules

So some paths (like `docs/development/v0/`, `docs/agents/`, or `src/orchestrator/`) may be excluded by the built-in Grep even when they are in your workspace.

**Takeaway**

For broad text search, don’t rely only on the built-in Grep tool. Use a terminal ripgrep when you need a full workspace search, for example:

```bash
rg -l "env-file" --glob '!node_modules' .
```

That aligns with what VS Code’s search is finding.

hi @JuroOravec and thank you for the detailed post. I have forwarded the details to our engineers.

Could you confirm if you are using any submodules?

Please also post a Request ID with privacy disabled so we can look into the details

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