[BUG] File autocomplete just stopped working (using @[Filename])
Environment
- Platform (select one):
- [ X] Anthropic API
- [ ] AWS Bedrock
- [ ] Google Vertex AI
- [ ] Other:
- Claude CLI version: 1.0.5 (Claude Code)
- Operating System: macOS 15.4.1
- Terminal: iTerm2
Bug Description
Not sure what happened but suddenly every time i try to use the @ symbol to start autocompleting a file, nothing actually happens. It doesn't sort or find any files. I don't think I changed anything with my claude configs, just upgraded
Steps to Reproduce
- Open claude code in iTerm2
- Start typing: "This is a file @Somefile"
- Observe using the @ symbol no longer autocomplete
Expected Behavior
It should start autocompleting
Actual Behavior
It doesn't :(
Additional Context
I dont think anything changed via configs (I certainly didn't change anything), but I'll look for this
+1
Same issue! Also, it only happens on one repository, other repos I have show file suggestions as expected.
Same issue! Also, it only happens on one repository, other repos I have show file suggestions as expected.
That's a really interesting point @quezadaesteban I just discovered the same thing. The @ autocomplete works in any other repo (I just tested a bunch of random ones), but in the giant production monorepo I've been working out of a while it just completely stopped yesterday. So at least its not a system issue....
I'm also having the same issue after updating when using Claude Code in a large monorepo. Downgrading to 1.04 fixes the issue for me. M4 MacOS Sequoia.
I'm also having the same issue after updating when using Claude Code in a large monorepo. Downgrading to 1.04 fixes the issue for me. M4 MacOS Sequoia.
Can confirm fix for now is just to downgrade
npm i -g @anthropic-ai/[email protected]
claude --version
I had the same autocomplete issue in a largish monorepo, but hit the bug described in #1392 after downgrading to 1.0.4. Downgrading to 1.0.3 fixed both things for me
npm install -g @anthropic-ai/[email protected]
claude config set -g autoUpdaterStatus disabled
Same here (Not sure if it matters but I also migrated to the local install)
Note, the issue seems to resolve itself with a fresh clone of the repository. Not sure what the cause of the initial issue, but hopefully this can shed some light onto it.
Same, after upgrade to 1.0.5 autocomplete doesn't work, config is not respected, etc
My issue was described in #1444 and autocomplete started working for me once I removed a broken symlink which I found by running rg --files --follow . >/dev/null
I had claude code beautify then compare cli.js from the claude code node module. It seems to think the problem was caused because claude started listing files with rg --files --follow, instead of rg --files, but that command returns exit code 2 if it encounters any broken symlinks and claude isn't properly handling that exit code so it just failed silently
My issue was described in #1444 and autocomplete started working for me once I removed a broken symlink which I found by running
rg --files --follow . >/dev/nullI had claude code compare beautify then compare cli.js from the claude code node module. It seems to think the problem was caused because claude started listing files with
rg --files --follow, instead ofrg --files, but that command returns exit code 2 if it encounters any broken symlinks and claude isn't properly handling that exit code so it just failed silently
Thank you @joshcurtis that totally worked for me!
My issue was described in #1444 and autocomplete started working for me once I removed a broken symlink which I found by running
rg --files --follow . >/dev/nullI had claude code compare beautify then compare cli.js from the claude code node module. It seems to think the problem was caused because claude started listing files with
rg --files --follow, instead ofrg --files, but that command returns exit code 2 if it encounters any broken symlinks and claude isn't properly handling that exit code so it just failed silently
Thank you @joshcurtis. Your description helped me solve a closely related issue: I had a sub-folder (attached to a Docker container) that my user, and hence Claude Code, did not have read access to. The rg --files --follow . >/dev/null command reported a Permission denied error for that folder, but unfortunately I cannot remove that folder. However, I found a solution by writing the folder's path to an .ignore file in the top-most folder, which the rg tool reads and adheres to.
My issue was described in #1444 and autocomplete started working for me once I removed a broken symlink which I found by running
rg --files --follow . >/dev/nullI had claude code compare beautify then compare cli.js from the claude code node module. It seems to think the problem was caused because claude started listing files with
rg --files --follow, instead ofrg --files, but that command returns exit code 2 if it encounters any broken symlinks and claude isn't properly handling that exit code so it just failed silently
it helpd, thank you bro!
I have the same problem but rg reports no broken symlinks or other errors
Hmm, I might actually be having a different issue if you guys aren't seeing any files at all. Mine seems to be more of a matching issue. For instance, I want to search for EmailRequestBuilder but only the E matches the file:
If I typed Em it loses the file:
I might open a different issue if this doesn't appear to be related.
Hmm, I might actually be having a different issue if you guys aren't seeing any files at all. Mine seems to be more of a matching issue. For instance, I want to search for
EmailRequestBuilderbut only theEmatches the file:If I typed `Em` it loses the file:
I might open a different issue if this doesn't appear to be related.
@mcantrell that is a differnt issue and one i started seeing around version 1.0.19 or 1.0.20 or so. Not sure tbh but i had to downgrade again to 1.0.18 and it went away and searches all files again
OK, I'll sniff around and see if there's already an open issue or add a new one.
Can confirm, downgrading to 1.0.18 solves the problem for me (macos, also had no broken symlink).
Same for me - downgrading to 1.0.18 solved it (MacOS, no broken symlinks)
Same for me - downgrading to 1.0.18 solved it (Ubuntu 24.04)
Hmm, I might actually be having a different issue if you guys aren't seeing any files at all. Mine seems to be more of a matching issue. For instance, I want to search for
EmailRequestBuilderbut only theEmatches the file:If I typed
Emit loses the file:I might open a different issue if this doesn't appear to be related.
@mcantrell that is a differnt issue and one i started seeing around version
1.0.19or1.0.20or so. Not sure tbh but i had to downgrade again to 1.0.18 and it went away and searches all files again
After analyzing the issue using Claude Code itself, it seems there is some hard limit / timeout for number of files ripgrep can process (it says 10000).
Adding more files to .rgignore resolves the issue for me (rg --files --follow . | wc -l = ~15000 files in my case).
Thanks @EgorDuplensky ! That was it for me!
$ rg --files --follow . | wc -l
64638
Set up .rgignore to exclude node_modules/:
$ cat .rgignore
node_modules/
Now rg is finding way less files and my auto-complete is working again!
$ rg --files --follow . | wc -l
215
Following the suggestion about broken symlinks, I found and fixed the problem.
find . -type l -exec test ! -e {} \; -print
For others experiencing this issue: Check for broken symlinks using the find command above. Circular symlinks seem to break the file indexing for me.
Thanks to the earlier suggestions in this thread! 🎯
This is still not working for me - it works on some folders but not consistently [no symlinks and sub 1000 files] Is this dependant on container configurations?
This should be working better now:
- v1.0.69 improved handling of large projects
- v1.0.84 added a new "Search" line to
claude /doctorwhich can help show if ripgrep is available - Upcoming release tomorrow will help WSL search
/mntdirectories + improve recovery on partial searches
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.
If I typed `Em` it loses the file:
I might open a different issue if this doesn't appear to be related.