[BUG] Claude Code does not work well on AmazonLinux2
Environment
- Platform (select one):
- [ ] Anthropic API
- [ x] AWS Bedrock
- [ ] Google Vertex AI
- [ ] Other: <!-- specify -->
- Claude CLI version: 1.0.70
- Operating System: Amazon Linux 2
- Terminal: Iterm2
Bug Description
Several key features don't seem to work on AmazonLinux2. Most notably that I've noticed
- Automatic file completion
- Custom sub agents
- Custom slash commands
Steps to Reproduce
Install ClaudeCode on AmazonLinux 2
Observed Behavior
- Automatic file completion
When typing a file name and pressing tab, I expect it to do a file search in my active directory. This works on Mac but not on AL2.
- Custom sub agents
When creating a custom sub-agent (either project or local), it is created successfully and persisted to the correct directory. However /agents command does not show them and they cannot be summed with the @ symbol.
- Custom clash commands
Similarly, commands put in ~/.claude/commands are not recognized or loaded.
Additional Context
I've tried with various versions of node up to 22.17.1 with no success. I've also tried the native binary installation with no success.
Are there log files that claude code produces for internal errors it might be facing that suppresses this functionality? If so, where might I find those logs?
7 Comments
Found 3 possible duplicate issues:
If your issue is a duplicate, please close it and 👍 the existing issue instead.
<sub>This issue will be automatically closed as a duplicate in 3 days if there are no additional comments. To prevent auto-closure, please 👎 this comment.</sub>
🤖 Generated with Claude Code
Good bot, this comment was able to resolve it for me. https://github.com/anthropics/claude-code/issues/2910#issuecomment-3049944606
I install RG and now all functionality is working as expected. It would be really great to document this dependency in the installation guide. It's not at all obvious that it's required and just fails these features silently.
Would be even better to check for system dependencies via the doctor command.
Thanks for flagging this issue - we actually bundle
rg, but it looks like that's not working properly on Amazon Linux 2. We'll look into this.Can you share what version of
glibcyou have, as well as what the results ofclaude!rg --versionare?This is the version I had on my system path before it was working.
And this is the version I installed that got it working
glibc version
We shipped some improvements in 1.0.84 that should help diagnose / mitigate this:
claude /doctornow shows the status of Search related functionality (which includes custom slash command discovery)rgover system-installedrg(see https://docs.anthropic.com/en/docs/claude-code/troubleshooting#search-and-discovery-issues)--debugto see if there arergrelated errorsWe also fixed some aarch-related Linux issues. Note that if you're using the native executable (as opposed to npm), you will need to explicitly install
rgand setUSE_BUILTIN_RIPGREP=0.Was able to verify this is working on an older desktop I didn't upgrade rg on. Thanks so much! The new debug feature is going to be awesome for troubleshooting system issues like this!
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.