@-mention file picker doesn't search additionalDirectories / --add-dir directories

Status Open
Maintainer reply None cached
Activity 0 comments · opened Aug 20, 2026

Summary

The @-mention file-reference picker in the interactive prompt only appears to index files under the primary working directory (cwd). Files reachable via permissions.additionalDirectories (settings.json) or via the --add-dir launch flag are not surfaced by the picker at all, even though both mechanisms correctly grant tool file-access (Read/Bash/Grep) to those directories.

This is confusing because additionalDirectories/--add-dir do successfully make a directory usable by tools, so users reasonably expect @-mention (the interactive equivalent) to work the same way.

Repro

  1. Two sibling repos, e.g. ~/project-A and ~/project-B.
  2. In ~/project-A/.claude/settings.json:

``json
{ "permissions": { "additionalDirectories": ["../project-B"] } }
``

  1. cd ~/project-A && claude — confirm Read/Bash/Grep can already reach files under ../project-B (they can).
  2. In the interactive prompt, type @ followed by the start of a filename that exists only under project-B (not under project-A).
  3. Expected: the file shows up as a suggestion, same as a file under cwd would.
  4. Actual: no suggestions appear at all.
  5. Relaunching with claude --add-dir ../project-B instead (or in addition) makes no difference — same empty result.

Verification method

Confirmed by driving an actual interactive session via a Python pty + pyte terminal emulator (not just reasoning from docs), typing the @-mention keystrokes and capturing the rendered screen. A positive control — @-mentioning a file that does live directly under cwd — correctly surfaced a suggestion in the same test harness, showing the harness itself isn't the reason for the empty result.

Suggested improvement

Have the @-mention picker's file index include permissions.additionalDirectories and any --add-dir paths, matching what tool file-access already allows. Short of that, it'd help to document clearly (in --add-dir/additionalDirectories docs) that the picker does not follow either mechanism, and that the workaround is to type the full/relative path manually.

View original on GitHub ↗