[BUG] @ mentions don't work with additional directories include via add-dir command
Open 💬 17 comments Opened Sep 10, 2025 by deepakn97
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 I add a new directory using /add-dir command, the file suggestion system using @file does not include suggestions from the additional directories in the dropdown.
Note that providing the complete path to the file using the same syntax works fine. However, that adds a lot of friction for the user.
What Should Happen?
Once additional directories are added, claude-code should reindex the files and start suggesting files from additional directories in the dropdown.
Ideally, this should happen as soon as the directories are added (depending on the number of files to be indexed)
Error Messages/Logs
Steps to Reproduce
- Run
/add-dircommand in claude-code. - Type
@filename, note that it does not suggest the matching filename from the additional directories.
Claude Model
Not sure / Multiple models
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
1.0.110
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Cursor
Additional Information
So far, I have tried the following:
- Restart claude-code after adding an extra directory. Issue persists.
- Try installing and upgrading system ripgrep as suggested here. Issue persists.
Local Settings files (<project_dir>/.claude/settings.local.json):
{
"permissions": {
"additionalDirectories": [
<additional_directory_paths>
]
}
}
17 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
Note that while this has been mentioned in other issues, every issue has been closed without providing a fix.
Hello,
Are there any updates on this issue? Due to this issue, working with multi-directory workspaces is very difficult.
Thank you
Please fix, only files within my user and project .claude folders are being displayed, no other files
This issue should be resolved asap since it has been mentioned multiple times
+1. This is blocking lots of workflows.
make sure your .zshrc doesnt have anything weird going on, this may have fixed the problem for me
@cmgrant0 can you please provide more details on what you mean by weirdness in .zshrc? This issue remains unresolved for me, so I am curious.
This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.
Issue is still occurring
Issue is still occurring +1
Issue is still occurring. Commenting to reset the auto-close clock. It took me a while to find this open issue because it keeps getting reported and then auto-closed 😕 Thanks.
Edit: @noVaSon's use case is also what I was trying to do!
Also resetting clock. Continuing to exist as a bug. Incredibly frustrating when working in two separate directories for say frontend and backend.
Adding another data point with a specific use case: nested independent git repos (not submodules, not subtrees).
Setup: Root workspace repo with independent git repos nested inside:
```
workspace/ # git repo
|── .claude/settings.json # additionalDirectories: ["repo-a", "repo-b"]
|── .gitignore # ignores * except .claude/ config
|── .claudeignore # build artifact exclusions only
|── repo-a/ # independent git repo
| └── deep/nested/file.txt
── repo-b/ # independent git repo
└── deep/nested/file.txt
Still not working.
bump :)
👍 Adding another real-world case where this hurts.
We run an internal multi-repo orchestration setup where
claudeis launched from a small per-session workspace directory, with the actual codebases (two large mobile repos, ~16–17k tracked files each) attached via--add-dir. Tools can read/edit those repos fine, but@completion never offers anything from them — so every file reference has to be typed as a full absolute path from memory, which effectively kills the@workflow for multi-repo use.Re-verified on v2.1.202 (macOS, TUI) with scripted terminal probes: files under
--add-dirroots never appear in the popup, regardless of index warm-up time or query specificity.Two extra data points that may help whoever picks this up:
@index follows directory symlinks into a large external repo (with proper.gitignorepruning inside it) — so symlinking the added dirs into the workspace is a viable workaround there 🎉Would love to see
--add-dirroots included in the completion index — for agent-launcher / multi-repo setups this is the main missing piece 🙏