[BUG] Ripgrep breaks _everything_

Resolved 💬 10 comments Opened Jul 30, 2025 by vmadman Closed Aug 20, 2025

Environment

  • Platform (select one):
  • [X] Anthropic API
  • [ ] AWS Bedrock
  • [ ] Google Vertex AI
  • [ ] Other:
  • Claude CLI version: v1.0.63
  • Operating System: Ubuntu 22.04
  • Terminal: bash

Bug Description

When you have rg (RipGrep) installed on your system, Claude will try to use it. However, there's something wrong with Claude's usage of it, it will always return "(no content)" (or similar).

If you tell Claude to execute Bash(rg something) .. it will return a blank. Even Bash(rg --version) will return an empty result.

However, if you tell Claude to pipe output to cat, e.g. Bash(rg --version | cat) ... then it will work. Ripgrep is basically detecting that Claude is not running in an interactive terminal (or some other jazz that I don't understand) and it won't output. I've seen this with other CLI tools, too, but rg is the most significant.

I'm not sure if this only applies to a certain version, or what, but calls to rg will always fail.

So, this was breaking my Search() tool and lots of other things. Slash commands were not being detected, agent files were not being detected, etc.

Steps to Reproduce

  1. Be me, or someone working on my Ubuntu VM (sorry, idk what's special about my env)
  2. Use the claude Search tool, or try to use slash commands, or agents

Expected Behavior

They should all work.

Actual Behavior

They don't work.

Additional Context

As a workaround, adding this to your settings.json will fix everything:

{
  "env": {
    "USE_BUILTIN_RIPGREP": 1
  },

Here's my rg info:

$ rg --version
ripgrep 12.1.0 (rev 1980630f17)
-SIMD -AVX (compiled)
+SIMD +AVX (runtime)

View original on GitHub ↗

This issue has 10 comments on GitHub. Read the full discussion on GitHub ↗