[BUG] `@` File Search Fails When a `.git` File or Directory Exists

Resolved 💬 3 comments Opened Sep 24, 2025 by newtron-vania Closed Jan 9, 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?

Environment

  • OS: macOS 15.6.1 (Build 24G90)
  • Claude Code Version: 1.0.123
  • Unity Version: 2022.3.60f1

---

Expected Behavior

The @ file search feature should continue to function normally, regardless of the presence of a file or folder named .git.

---

Actual Behavior

The @ file search feature becomes completely non-functional as soon as a file or directory named .git is present in the project root.

---

Attempted Solutions

  • Adding exception rules to .claudeignore.
  • Deleting the ~/.claude configuration folder.
  • Neither of these approaches resolved the issue.

What Should Happen?

The @ automatic file search feature should function normally, even when a .git file or folder is present in the project's root directory.

Error Messages/Logs

The @ automatic file search feature should function normally, even when a .git file or folder is present in the project's root directory.

Steps to Reproduce

  1. Create a new Unity project.
  2. Verify that the @ file search functionality works correctly.
  3. In the project's root directory, create an file or folder named even if.git.

```bash
# Option A: Create an empty file
touch .git

# Option B: Create an empty folder
mkdir .git
```

  1. Try to use the @ file search feature again.

Claude Model

Sonnet (default)

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

1.0.123

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗