Codex assumes ripgrep is installed

Resolved 💬 2 comments Opened Jun 3, 2025 by joncooper Closed Sep 3, 2025

What version of Codex is running?

codex-cli 0.0.2505291458

Which model were you using?

o4-mini

What platform is your computer?

Darwin 24.5.0 arm64 arm

What steps can reproduce the bug?

Codex assumes ripgrep is available.

  1. Run codex from a directory containing existing code.
  2. Prompt with: "Read this codebase, tell me what it is for, what it does, and how it does that."

Example:

│user                                                                             ││
│Read this codebase, tell me what it is for, what it does, and how it does that.  ││
│                                                                                 ││
│command (code: 127, duration: 9ms)                                               ││
│$ bash -lc 'rg --files'                                                          ││
│bash: rg: command not found                                                      ││
│                                                                                 ││
│command (code: 0, duration: 16ms)                                                ││
│$ bash -lc 'find . -maxdepth 2'                                                  ││
│.                                                                                ││
│./generate-version.sh                                                            ││
│./index.html                                                                     ││
│./dist                                                                           ││
│./dist/popup                                                                     ││
│... 149 additional lines

What is the expected behavior?

It's nice that Codex takes another approach. But if ripgrep is the best one, it should note that to the user and prompt them to install it or offer to install it for them.

What do you see instead?

Best Practices                                                                                                                                                           ││
│• Use rg and rg --files instead of slow grep/ls -R.                                                                                                                      █│
│• If there’s a .pre-commit-config.yaml, I can run pre-commit run --files <paths>. I won’t fix unrelated pre-existing errors.                                             █│
│• I’ll keep changes minimal, fix root causes, and follow the repo’s style.                                                                                               █│
│                                                                                                                                                                         █│
│Next Steps                                                                                                                                                               █│
│• Tell me what you’d like to work on (bug fix, new feature, refactoring, test failures, etc.).                                                                           █│
│• I’ll propose changes, apply them, run tests, and report back.                                                                                                          █│
│                                                                                                                                                                         █│
│What would you like to do first?                                                                                                                                         █│
│                                                                                                                                                                         █│
│user                                                                                                                                                                     █│
│Read this codebase, tell me what it is for, what it does, and how it does that.                                                                                          █│
│                                                                                                                                                                         █│
│command (code: 127, duration: 9ms)                                                                                                                                       █│
│$ bash -lc 'rg --files'                                                                                                                                                  ││
│bash: rg: command not found                                                                                                                                              ││
│                                                                                                                                                                         ││
│command (code: 0, duration: 16ms)                                                                                                                                        ││
│$ bash -lc 'find . -maxdepth 2'                                                                                                                                          ││
│.                                                                                                                                                                        ││
│./generate-version.sh                                                                                                                                                    ││
│./index.html                                                                                                                                                             ││
│./dist                                                                                                                                                                   ││
│./dist/popup                                                                                                                                                             ││
│... 149 additional lines

Additional information

It's probably fairer to call this an enhancement request than a bug if there are no cases in which the missing rg causes Codex to fail. I haven't tested it further than this, having simply installed ripgrep and gone on with my day.

View original on GitHub ↗

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