File Reference Autocomplete Broken in Claude Code Extension
Status Open
Maintainer reply None cached
Workaround ✓ Mentioned in thread ↓
Activity 13 comments · opened Jun 12, 2025
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"}]
13 Comments
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 usegit-grep/fzfunder 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
.gitignorefile setting my python files started to turn up in search. Before.pyfiles was not suggested when i typed@. It seems like there is an issue with this implementation.This is my
.gitignore:Inspired by @gabor-one 's workaround (
"claudeCode.respectGitIgnore": false), I dug into which specific line in.gitignorewas 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*.pyfiles.Commenting out just that one line fixes it without disabling the entire gitignore:
@gabor-one 's fix worked for me!
https://github.com/anthropics/claude-code/issues/2012#issuecomment-3758969956
The
@fileautocomplete behavior varies between the CLI and VS Code extension:Workaround 1 — Use file paths directly instead of @ references:
Instead of
@package.json, just mention the file path:Claude will use the Read tool to fetch the file. This works reliably in both CLI and extension.
Workaround 2 — Drag and drop files (VS Code):
In the VS Code extension, you can drag files from the Explorer sidebar into the Claude input. This creates a proper file reference.
Workaround 3 — Use paste for file contents:
Open the file in your editor, select all, copy, paste into Claude. The pasted content appears as a collapsible block.
Workaround 4 — Tab completion in CLI:
In the CLI, file path Tab completion may work:
Workaround 5 — Check if the feature is enabled:
The
@filefeature may depend on your version and settings:In VS Code settings, check for Claude-related autocomplete settings:
(The exact setting name may vary by version.)