[Bug] Claude ignores files listed in .gitignore during file search

Status Open
Reported on v2.1.222
Maintainer reply None cached
Activity 0 comments · opened Aug 12, 2026

Bug Description
When Claude is looking for files, it usually ignores the files listed in the .gitignore file. For example, if there are both a .env and a .env.example file, it usually uses the latter because it couldn't find the former. Only when I explicitly say in the prompt that it should use the .env file is it correctly selected. I noticed this happening with other files, too.

Environment Info

  • Platform: darwin
  • Terminal: Apple_Terminal
  • Version: 2.1.222
  • Feedback ID: d11001d0-8c71-46fe-a8bc-9bde5af2b8ca

Errors

[]

View original on GitHub ↗