File autocomplete doesn't find files in current working directory
Description
When using the @ file autocomplete in Claude Code, files in the current working directory (cwd) are not shown in the autocomplete suggestions. The autocomplete only shows files relative to the git repository root, not the cwd.
Steps to Reproduce
- Navigate to a subdirectory within a git repository (e.g.,
cd /project/src/subdir) - Have a file in that directory (e.g.,
script.js) - In Claude Code prompt, type
@script.jsor@./script.js - Observe that autocomplete suggestions only show files from the repo root (e.g.,
../../../script.js) but not thescript.jsin the current directory
Expected Behavior
Files in the current working directory should appear in autocomplete suggestions, ideally prioritized over files in parent directories.
Actual Behavior
Only files relative to the git repository root are shown. Files in the cwd are not displayed even when using @./ prefix.
Screenshots
Typing @script.js:
!autocomplete showing only parent directory files
Typing @./script.js:
!still showing only parent directory files
Environment
- Claude Code CLI
- macOS (Darwin 25.2.0)
- Working directory:
/Users/adeo/amura/load-tests/pms-load-tests/src/chat/chat-api-single - Git repo root:
/Users/adeo/amura/load-tests/pms-load-tests
Additional Context
The file definitely exists in the cwd (confirmed via ls -la), but the autocomplete feature doesn't find it.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗