In brief · TL;DR:
rgsearches text and file paths;gitshows history and changes;npm,pythonand other commands run software; editing tools apply patches. Claude Code and Codex may use similar commands or dedicated tools — there is no universal command assigned to each brand. Understanding the categories makes agent actions easier to supervise.
The AI ran rg, git and npm: how to read the commands behind coding agents
Learn what rg, git diff, shell tools and build commands tell you about Claude Code and Codex — and why neither agent is tied to one search command.

In this article
01 — The discovery
What changed, who it is for and why it matters.
You ask an agent to fix a form. The screen fills with rg --files, git diff, npm test. Sometimes there is no visible shell command at all, only a file-search tool or a patch operation.
The useful skill is not typing faster than an agent. It is understanding what kind of work each action represents.
The ripgrep project provides the rg binary for fast recursive searching that respects ignore rules. OpenAI’s published Codex prompting guide also recommends rg and rg --files when available. So “Claude uses rg, but Codex uses a different search program” is not a dependable distinction.
What matters is the harness, available tools, operating system, project instructions and current task. One agent might run rg in a shell; another might use a specialised file-search tool. Both can search a project without requiring users to know the underlying implementation.
Read actions by category
| Command or tool | Typical purpose | What to check |
|---|---|---|
pwd, ls, find, rg --files | Location and inventory | Correct directory, ignored files |
rg -n "text" ., grep | Content search | Relevant files and line numbers |
cat, sed, Read | Reading content | Context and selected range |
apply_patch, Edit | Changing code | Resulting diff and scope |
git status, git diff | Inspecting changes | Unrequested changes |
npm test, pytest, cargo test | Running tests | Test availability and outcome |
npm run build, hugo | Building software | Actual success or failure |
curl, wget | Sending requests or downloading | URL, transmitted data, credentials |
These are examples, not a guarantee that every command exists on every machine. npm test depends on a configured Node project. pytest needs a suitable Python environment. Read and Edit may be agent-specific tools rather than shell programs.
A subtle detail about rg
By default, ripgrep honours .gitignore and related rules, skips hidden files and avoids binary content. This makes searching cleaner. It also means an absent match does not necessarily mean an absent file. Check the working directory and ignore rules before declaring that a configuration does not exist. ripgrep guide.
Different tools, one evidence trail
Claude Code and Codex expose different capabilities and execution interfaces. An agent with a specialised read or edit tool may use it instead of composing a shell command. Open Codex harness architecture.
The goal is an evidence trail: locate a file, understand it, make a bounded change, then check the result. A long transcript of commands is not proof that a bug was fixed.
02 — The Solo verdict
Our straight take: is it worth your time?
Learn to recognise rg and git diff before memorising dozens of rarely used commands. Together they help answer where the agent found something and what it changed.
For risky operations such as deleting, overwriting, publishing or transmitting data, request a clear explanation before authorising execution.
03 — The workbench: inspect a project without edits
Requirements: a practice Git repository with ripgrep installed. Open a shell in the repository directory. These commands read information only:
pwd
rg --files
rg -n "TODO" .
git status --short
git diff --stat
Expected observations: the working folder, searchable file paths, TODO matches with line numbers, Git status and a summary of unstaged changes. No matches or no changes can produce empty output. Ripgrep returns exit status 1 for no matches; that need not signal a broken installation.
Ask an agent: “Show the files you searched and justify the search. Distinguish read-only commands from proposed edits. Make no changes.” Compare the explanation with real file paths.
Next: configure a code editor in which you can inspect this work.
References: ripgrep, search guide, Git, Codex prompting. Guided, read-only exercise.
More in Tutorials
See all
Your app looks great. Is it safe for other people to use?
Understand permissions, API secrets, data exposure and the boundary between an AI-built prototype and a secure service.

Which no-code or AI app tool should you choose?
Compare visual editors, spreadsheets and AI builders through data ownership, portability, pricing boundaries and maintenance.

What can you build without coding? From spreadsheets to apps
Explore realistic no-code and AI projects, and distinguish prototypes, internal workflows and customer-facing products.

