Skip to content

File autocomplete doesn't find files in current working directory #16138

Description

@abhideo-vw

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

  1. Navigate to a subdirectory within a git repository (e.g., cd /project/src/subdir)
  2. Have a file in that directory (e.g., script.js)
  3. In Claude Code prompt, type @script.js or @./script.js
  4. Observe that autocomplete suggestions only show files from the repo root (e.g., ../../../script.js) but not the script.js in 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicateThis issue or pull request already exists

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions