[BUG] File autocomplete just stopped working (using @[Filename])

Resolved 💬 26 comments Opened May 28, 2025 by smaccoun Closed Aug 22, 2025
💡 Likely answer: A maintainer (ant-kurt, collaborator) responded on this thread — see the highlighted reply below.

Environment

  • Platform (select one):
  • [ X] Anthropic API
  • [ ] AWS Bedrock
  • [ ] Google Vertex AI
  • [ ] Other: <!-- specify -->
  • 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

  1. Open claude code in iTerm2
  2. Start typing: "This is a file @Somefile"
  3. 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

View original on GitHub ↗

26 Comments

rayeddev · 1 year ago

+1

quezadaesteban · 1 year ago

Same issue! Also, it only happens on one repository, other repos I have show file suggestions as expected.

smaccoun · 1 year ago
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....

peterbedorjr · 1 year ago

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.

smaccoun · 1 year ago
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/claude-code@1.0.4

claude --version
joshcurtis · 1 year ago

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/claude-code@1.0.3
claude config set -g autoUpdaterStatus disabled
poppabear8883 · 1 year ago

Same here (Not sure if it matters but I also migrated to the local install)

poppabear8883 · 1 year ago

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.

nick4fake · 1 year ago

Same, after upgrade to 1.0.5 autocomplete doesn't work, config is not respected, etc

joshcurtis · 1 year ago

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

smaccoun · 1 year ago
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 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 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

Thank you @joshcurtis that totally worked for me!

mtr · 1 year ago
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 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 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

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.

maketeamake · 1 year ago
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 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 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

it helpd, thank you bro!

mcantrell · 1 year ago

I have the same problem but rg reports no broken symlinks or other errors

mcantrell · 1 year ago

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:

<img width="682" alt="Image" src="https://github.com/user-attachments/assets/23545923-96ee-4ff3-941f-76482fecf71f" />

If I typed Em it loses the file:

<img width="674" alt="Image" src="https://github.com/user-attachments/assets/ba2b1330-38e3-4dbc-b4e2-da91fc724efa" />

I might open a different issue if this doesn't appear to be related.

smaccoun · 1 year ago
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: <img alt="Image" width="682" src="https://private-user-images.githubusercontent.com/20870/454981876-23545923-96ee-4ff3-941f-76482fecf71f.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NDk4Mzg1ODIsIm5iZiI6MTc0OTgzODI4MiwicGF0aCI6Ii8yMDg3MC80NTQ5ODE4NzYtMjM1NDU5MjMtOTZlZS00ZmYzLTk0MWYtNzY0ODJmZWNmNzFmLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTA2MTMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwNjEzVDE4MTEyMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTE3MzZkZGM0NDU0NmYxODM1MjQ0YWMyYTdmYjFhZTFhMjQyMDZjMThkOGNkYmQ4M2U4MGVmNzQxMmFlM2FjYTgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.Hh1KGEKa7a9LfLwtiYLJkB6ByQfs8Exd9fJfM_K1mX4"> If I typed Em it loses the file: <img alt="Image" width="674" src="https://private-user-images.githubusercontent.com/20870/454982068-ba2b1330-38e3-4dbc-b4e2-da91fc724efa.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NDk4Mzg1ODIsIm5iZiI6MTc0OTgzODI4MiwicGF0aCI6Ii8yMDg3MC80NTQ5ODIwNjgtYmEyYjEzMzAtMzhlMy00ZGJjLWI0ZTItZGE5MWZjNzI0ZWZhLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTA2MTMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwNjEzVDE4MTEyMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTM3YzVkYzc0NWQ0YjQzMmQzZTA3ZTQxMThmMzE5MjNjNzVmNTBhNjRmMmEwZDk0YzFhYTg1YzRkODc3NmNhNzgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.XvjpaVnrLoPTJray27tUzh-51dwRkUuPsEIWg1eixQc"> 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

mcantrell · 1 year ago

OK, I'll sniff around and see if there's already an open issue or add a new one.

norbertbanyai · 1 year ago

Can confirm, downgrading to 1.0.18 solves the problem for me (macos, also had no broken symlink).

phiob · 1 year ago

Same for me - downgrading to 1.0.18 solved it (MacOS, no broken symlinks)

leonardocouy · 1 year ago

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 EmailRequestBuilder but only the E matches the file: > <img alt="Image" width="682" src="https://private-user-images.githubusercontent.com/20870/454981876-23545923-96ee-4ff3-941f-76482fecf71f.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NDk4Mzg1ODIsIm5iZiI6MTc0OTgzODI4MiwicGF0aCI6Ii8yMDg3MC80NTQ5ODE4NzYtMjM1NDU5MjMtOTZlZS00ZmYzLTk0MWYtNzY0ODJmZWNmNzFmLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTA2MTMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwNjEzVDE4MTEyMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTE3MzZkZGM0NDU0NmYxODM1MjQ0YWMyYTdmYjFhZTFhMjQyMDZjMThkOGNkYmQ4M2U4MGVmNzQxMmFlM2FjYTgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.Hh1KGEKa7a9LfLwtiYLJkB6ByQfs8Exd9fJfM_K1mX4"> > If I typed Em it loses the file: > <img alt="Image" width="674" src="https://private-user-images.githubusercontent.com/20870/454982068-ba2b1330-38e3-4dbc-b4e2-da91fc724efa.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NDk4Mzg1ODIsIm5iZiI6MTc0OTgzODI4MiwicGF0aCI6Ii8yMDg3MC80NTQ5ODIwNjgtYmEyYjEzMzAtMzhlMy00ZGJjLWI0ZTItZGE5MWZjNzI0ZWZhLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTA2MTMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwNjEzVDE4MTEyMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTM3YzVkYzc0NWQ0YjQzMmQzZTA3ZTQxMThmMzE5MjNjNzVmNTBhNjRmMmEwZDk0YzFhYTg1YzRkODc3NmNhNzgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.XvjpaVnrLoPTJray27tUzh-51dwRkUuPsEIWg1eixQc"> > 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
EgorDuplensky · 1 year ago

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).

ManningWorks · 1 year ago

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
gouthamindukuri · 1 year ago

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! 🎯

harshh-jainn · 1 year ago

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?

ant-kurt collaborator · 10 months ago

This should be working better now:

  • v1.0.69 improved handling of large projects
  • v1.0.84 added a new "Search" line to claude /doctor which can help show if ripgrep is available
  • Upcoming release tomorrow will help WSL search /mnt directories + improve recovery on partial searches
github-actions[bot] · 10 months ago

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.