[BUG] @ Mention does not search for files in .gitignore

Resolved 💬 1 comment Opened May 3, 2026 by taiyangc Closed Jun 2, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

When trying to @ mention a file inside claude code, if it happens to be part of .gitignore, it cannot be mentioned. This is frustrating because not being committed does not mean it cannot be referenced!

What Should Happen?

@ mention should be able to search for all files under the current directory, including those being gitignored

Error Messages/Logs

Steps to Reproduce

  1. Have a file that is added to .gitignore
  2. Launch claude code
  3. Try to @ the file with any part of the name
  4. Nothing comes up

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.126

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

iTerm2

Additional Information

_No response_

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗