@mention path autocomplete does not traverse into nested git repositories
Summary
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.
Environment
- Claude Code version: latest
- OS: Windows 11 Pro
- Shell: PowerShell / Git Bash
Repository structure
subscription/ ← primary workspace (git repo)
├── .claude/
│ └── settings.json
├── subproject.Api/ ← separate git repo (.git present), listed in subscription's .gitignore
└── subproject.Web/ ← separate git repo (.git present), listed in subscription's .gitignore
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 ❌
What I tried
- Added
"respectGitignore": falseto.claude/settings.json— directories become visible but their contents are not indexed - Used
--add-dir ./subproject.Api --add-dir ./subproject.Web— same result, directories visible but no file indexing - Created
.claude/settings.jsonwith"respectGitignore": falseinside each nested repo — no change
Expected behavior
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).
Actual behavior
Claude Code stops indexing at the .git boundary of nested repositories. The directory itself is visible in autocomplete but its contents return no results.
Workaround
None found. The only functional alternative is to run Claude from within each nested repo individually, which loses the cross-repo context of the parent workspace.
Additional context
This is a common monorepo-style setup where a root project coordinates multiple independent service repositories. Being able to reference files across all repos from a single Claude session would significantly improve the developer experience.
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗