[BUG] @mention path autocomplete does not traverse into nested git repositories
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 running Claude Code from a parent directory that contains nested git repositories (directories with their own .git), the @ mention path autocomplete does not index or traverse into those nested repos — even when using respectGitignore: false in settings and --add-dir to explicitly add those directories as workspaces.
What Should Happen?
Files inside nested git repositories (added via --add-dir or made visible via respectGitignore: false) should be indexed and available for @ mention path autocomplete when navigating their paths (e.g., @subproject.Api/src/Program.cs).
Error Messages/Logs
Steps to Reproduce
- Run
claude(orclaude --add-dir ./subproject.Api --add-dir ./subproject.Web) fromsubscription/ - In the chat, type
@subproject.Api→ the directory appears in autocomplete ✅ - Type
@subproject.Api/src/→ no results, autocomplete is blank ❌ - Type
@Program.cs(fuzzy file search) → no results ❌
Claude Model
None
Is this a regression?
No, this never worked
Last Working Version
_No response_
Claude Code Version
2.1.94
Platform
Anthropic API
Operating System
Other
Terminal/Shell
Other
Additional Information
Original Issue: https://github.com/anthropics/claude-code/issues/32924
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗