Grep tool not working as exepcted when case-insensitive flag not provided by agent

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

The grep tool is unable to find matches in file configured in certain ways (like files in gitignore) if the agent doesn’t not perform a case insenstive call.

Request ID: b0cf3bca-75b6-45cc-98f9-49e4167fb3da

Steps to Reproduce

Add files in gitignore and ask the agent to find something in them

Expected Behavior

The case insensitive flag should not affect the matches when the query matches the searched string

Operating System

Windows 10/11

Current Cursor Version (Menu → About Cursor → Copy)

Version: 2.3.21 (system setup)
VSCode Version: 1.105.1
Commit: 68e0a0385b87408d050869ea543e3778ad53f780
Date: 2026-01-02T23:46:13.381Z
Electron: 37.7.0
Chromium: 138.0.7204.251
Node.js: 22.20.0
V8: 13.8.258.32-electron.0
OS: Windows_NT x64 10.0.26200

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey, thanks for the report.

That’s odd behavior. A case-sensitive exact match search for getHandlersForToken should’ve returned results. The -i flag shouldn’t affect an exact match.

I’ll pass this to the team to investigate.

A couple quick questions:

  1. Is this consistently reproducible, or was it a one-off?
  2. After restarting Cursor and starting a new chat, does the issue still happen?
1 Like

I tried today and it works, weird!