@mention path autocomplete does not traverse into nested git repositories

Resolved 💬 4 comments Opened Mar 10, 2026 by reduardo7 Closed Apr 7, 2026

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

  1. Run claude (or claude --add-dir ./subproject.Api --add-dir ./subproject.Web) from subscription/
  2. In the chat, type @subproject.Api → the directory appears in autocomplete ✅
  3. Type @subproject.Api/src/no results, autocomplete is blank
  4. Type @Program.cs (fuzzy file search) → no results

What I tried

  • Added "respectGitignore": false to .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.json with "respectGitignore": false inside 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.

View original on GitHub ↗

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