File Reference Autocomplete Broken in Claude Code Extension
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"}]
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...
Has anyone found a good workaround for for this?
I have the same problem
I have the same issue.
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 :)
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.
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.
Still occurring.
Still occuring
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/
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