@ file-mention autocomplete only searches primary cwd, not directories added via --add-dir / additionalDirectories

Open 💬 1 comment Opened Jul 8, 2026 by victorjkhalaf

What happened

When multiple working directories are registered — via the --add-dir flag, the /add-dir command, or permissions.additionalDirectories in settings — the @ file-mention autocomplete only searches the primary working directory (the one claude was launched from). Files in the additional directories are not surfaced by the picker, even though tools (Read/Edit/etc.) can access them.

Steps to reproduce

  1. Launch from one project: cd ~/projects/docker/ecommerce && claude --add-dir ~/projects/docker/skyhook
  2. Confirm both show as working directories in the session.
  3. Type @ and start typing the name of a file that exists only in skyhook.

Expected: the picker offers files from all registered working directories.
Actual: the picker only offers files under the primary cwd (ecommerce); files in skyhook never appear.

Environment

  • Claude Code v2.1.204
  • macOS (darwin 25.5.0), zsh
  • Directories registered via both --add-dir and permissions.additionalDirectories

Why it matters

For monorepo-adjacent setups (many sibling project repos under one parent), cross-project file references are a common workflow. --add-dir is the documented way to register additional working directories, but the @ picker not indexing them means you have to type full relative paths by hand instead of using autocomplete.

Request

Either (a) have the @ file-mention autocomplete search across all registered working directories, or (b) document explicitly that the picker is scoped to the primary cwd and clarify the intended way to reference files in additional directories.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗