claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

File Reference Autocomplete Broken in Claude Code Extension

Open serbotec opened this issue 9 months ago • 9 comments

Bug Description Title: @ mentioning files not working in Claude Code Description: The @ symbol file mentioning feature in Claude Code is not functioning. When attempting to reference files using @filename syntax, the feature does not work as expected. Newest Claude Code within VS Code Insiders.

Steps to reproduce:

Open Claude Code in a project directory Try to use @ symbol to mention a file (e.g., @package.json) Feature does not work

Environment Info

  • Platform: macos
  • Terminal: vscode
  • Version: 1.0.21
  • Feedback ID: bba8f20a-5e3d-4421-8f11-2db5bd929aa3

Errors

[{"error":"Error: Command failed: security find-generic-password -a $USER -w -s \"Claude Code\"\nsecurity: SecKeychainSearchCopyNext: The specified item could not be found in the keychain.\n\n    at genericNodeError (node:internal/errors:983:15)\n    at wrappedFn (node:internal/errors:537:14)\n    at checkExecSyncError (node:child_process:882:11)\n    at execSync (node:child_process:954:15)\n    at HZ (file:///Users/mibook/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:659:3921)\n    at file:///Users/mibook/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:582:11795\n    at Q (file:///Users/mibook/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:526:17190)\n    at oJ (file:///Users/mibook/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:582:10941)\n    at YS (file:///Users/mibook/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:582:10022)\n    at R6 (file:///Users/mibook/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:582:14134)","timestamp":"2025-06-12T15:21:07.931Z"}]

serbotec avatar Jun 12 '25 15:06 serbotec

I just started using Claude Code (CLI) and I noticed @ doesn't work in large repos, but it does in small ones. Not sure why it can't just use git-grep/fzf under the hood...

JaydenNavarro-at avatar Jun 18 '25 12:06 JaydenNavarro-at

Has anyone found a good workaround for for this?

limury avatar Jul 07 '25 21:07 limury

I have the same problem

Marinarius avatar Jul 23 '25 22:07 Marinarius

I have the same issue.

reikla avatar Jul 29 '25 11:07 reikla

Maybe this will help someone -- It turns out mentioning files in Claude Code doesn't work unless you have a git repository setup in the project directory. After setting one up via the git CLI, it started working for me :)

not-manu avatar Aug 04 '25 11:08 not-manu

After the latest update it appears to be working now in large repos, but it's pretty slow and there's lag when entering characters.

JaydenNavarro-at avatar Aug 08 '25 12:08 JaydenNavarro-at

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.

github-actions[bot] avatar Dec 06 '25 10:12 github-actions[bot]

Still occurring.

jucor avatar Dec 06 '25 12:12 jucor

Still occuring

jpwinans avatar Dec 26 '25 16:12 jpwinans

Workaround: After turning off respect .gitignore file setting my python files started to turn up in search. Before .py files was not suggested when i typed @. It seems like there is an issue with this implementation.

"claudeCode.respectGitIgnore": false

This is my .gitignore:

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
#  Usually these files are written by a python script from a template
#  before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
#   For a library or package, you might want to ignore these files since the code is
#   intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
#   According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
#   However, in case of collaboration, if having platform-specific dependencies or dependencies
#   having no cross-platform support, pipenv may install dependencies that don't work, or not
#   install all needed dependencies.
#Pipfile.lock

# poetry
#   Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
#   This is especially recommended for binary packages to ensure reproducibility, and is more
#   commonly ignored for libraries.
#   https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock

# pdm
#   Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock
#   pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
#   in version control.
#   https://pdm.fming.dev/#use-with-ide
.pdm.toml

# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
#*.sage.py

# Environments
.env
.venv
env/
venv/*
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/

# PyCharm
#  JetBrains specific template is maintained in a separate JetBrains.gitignore that can
#  be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
#  and can be added to the global gitignore or merged into this file.  For a more nuclear
#  option (not recommended) you can uncomment the following to ignore the entire idea folder.
.idea/

# Mac specific
.DS_Store

sandbox

# VSCode
.vscode/*

# Local History for Visual Studio Code
.history/

# Built Visual Studio Code Extensions
*.vsix

# Used by the custom azure pipeline
artifacts/
# Auto gen
tss/_version.py
experimental/


# For people using podman
.testcontainers.properties

# LLM context files
CLAUDE.local.md

# There is .gitignore within ignoreing * but claude code doesn't picks it up
.ruff_cache/

gabor-one avatar Jan 16 '26 09:01 gabor-one

Inspired by @gabor-one 's workaround ("claudeCode.respectGitIgnore": false), I dug into which specific line in .gitignore was causing the issue.

Turns out it's *.py,cover — a line included by default in the Python template from gitignore.io. It seems the extension's gitignore parser misinterprets the comma and excludes all *.py files.

Commenting out just that one line fixes it without disabling the entire gitignore:

# *.py,cover

Eric-HanGyeongSoo avatar Feb 19 '26 07:02 Eric-HanGyeongSoo