[BUG] Folder starting with "__" causes weird behaviour
Resolved 💬 3 comments Opened Jan 5, 2026 by D-32 Closed Feb 19, 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?
I have a folder called __tests, whenever I @ tag it in the prompt Claude Code gets confused and starts reading files from __tests__ which then fail cause that's not the directory's name. It of course figures it out eventually but it's very reproducible.
You're right - the directory is __tests (double underscore only at the start), not __tests__. My mistake with the glob pattern.
What Should Happen?
It should use the folder as specified in the prompt.
Error Messages/Logs
Steps to Reproduce
- Create a
__testsfolder with a test file - Tell CC to read the file while @ tagging the folder
Claude Model
Opus
Is this a regression?
No, this never worked
Last Working Version
_No response_
Claude Code Version
v2.0.75
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Other
Additional Information
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗