[Report] File path completion may fail unless USE_BUILTIN_RIPGREP is enabled
Environment
- Platform (select one):
- [x] Anthropic API
- [ ] AWS Bedrock
- [ ] Google Vertex AI
- [ ] Other:
- Claude CLI version:
1.0.16 (Claude Code) - Operating System: macOS 15.5
- Terminal: iTerm2, Wezterm, Ghostty
Report
I discovered that the file path completion feature of the claude command may not work depending on how ripgrep is installed.
I am creating this issue to share a workaround for other claude users who might encounter the same problem.
This issue can be avoided by setting an environment variable. Also, it is being discussed as an issue in the repository of the installation tool.
- https://github.com/aquaproj/aqua/issues/3918
I installed the ripgrep command using aqua, which is a version management tool.
When I run the claude command in this environment, file path completion does not work.
However, if I use the ripgrep command installed via Homebrew, file completion works as expected.
Steps to Reproduce
- Install
ripgrepglobally using aqua withAQUA_GLOBAL_CONFIG.- Reference: https://aquaproj.github.io/docs/tutorial/global-config/
$ which rg /Users/budougumi0617/.local/share/aquaproj-aqua/bin/rg $ ls -la $(which rg) lrwxr-xr-x@ 1 budougumi0617 staff 13 Mar 8 18:13 /Users/yoichiro.shimizu/.local/share/aquaproj-aqua/bin/rg -> ../aqua-proxy - Run the
claudecommand. - Type
@to try file path completion.
Expected Behavior
File path completion works as expected.
Actual Behavior
File path completion does not work.
Additional Context
- Reference: https://github.com/anthropics/claude-code/issues/155
If I enable the USE_BUILTIN_RIPGREP environment variable in ~/.claude/settings.json, file completion works.
$ cat ~/.claude/settings.json
{
"env": {
"USE_BUILTIN_RIPGREP": 1
}
}
I installed ripgrep with homebrew, but file tagging also does work for me. Adding the setting "USE_BUILTIN_RIPGREP": 1 didn't work either.
which rg
/opt/homebrew/bin/rg
I'm experiencing a custom slash command issue with the same setup. Markdown (.md) files in .claude/commands/ and ~/.claude/commands/ are not recognized as custom slash commands.
My setup is the same as described in this issue: rg (ripgrep) command installed by aqua.
Setting "USE_BUILTIN_RIPGREP": 1 in the env also solved this issue.
Setting the "USE_BUILTIN_RIPGREP": 1 did NOT solve the problem for me.
But setting my RIPGREP_CONFIG_PATH to "dummy" (so it does not load a custom ripgrep config in claude code) did solve the issue for me!
"env": {
"RIPGREP_CONFIG_PATH": "dummy"
},
See my detailed write-up I did here: https://github.com/anthropics/claude-code/issues/4741#issuecomment-3177976916
We shipped some changes for this recently. Next steps:
claude /doctorshould tell you if Search (which includes @ file mentions and custom agents / slash commands) is working- If not, see https://docs.anthropic.com/en/docs/claude-code/troubleshooting#search-and-discovery-issues
I think this issue will not occur from the below version. I appreciate your comments!! https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md#1084
Use built-in ripgrep by default; to opt out of this behavior, set USE_BUILTIN_RIPGREP=0
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.