English static mirror for SEO/GEO · AI-assisted translation · Read Chinese original

Back to the Stone Age: Why Top AI Agents Still Rely on grep

Forum topic · QianXun · 2026-05-16

Summary

A 2026 arXiv paper titled 'Is Grep All You Need? How Agent Harnesses Reshape Agentic Search' reveals a surprising finding: in top AI coding assistants like Claude Code and Gemini CLI, the classic 1970s command-line tool grep outperforms modern vector-based semantic search. The reason is twofold. First, semantic retrieval suffers from 'semantic interference'—it pulls in loosely related but irrelevant content (e.g., finance or payroll files when searching for payment logic), polluting the model's context. Second, long conversation histories bias vector retrieval away from current, precise clues, whereas grep shows remarkable resilience to such noise. The paper's core insight is that the agent harness—the CLI tools and terminal environment given to modern AI agents—changes the game: instead of passively receiving 'relevant snippets,' agents can actively issue precise queries and instantly locate a specific variable in 100,000 lines of code. This is a return to first principles: deterministic tools can beat probabilistic ones in complex intelligent systems.

Imagine you are a great detective investigating a complex case, with two tools for finding people:

1. "Telepathy" (Vector Search): You close your eyes and think of a "general appearance." You say, "I want someone who looks wealthy with melancholic eyes," and your superpower takes you to places matching that *feeling*. 2. "Checking the registry" (Grep Search): You hold a list and directly look up "whose ID number ends in 8888."

In which situation would you trust the second tool more?

Usually, when the case is tangled, the evidence is mountainous, and you must find that *one precise clue*, you would definitely choose the registry.

In the AI world, we are currently experiencing an deeply ironic cycle. Everyone assumed that large language models (LLMs), being so smart, must rely on fancy "vector databases" and "semantic search" to think. But a major arXiv paper from May 2026 — 《Is Grep All You Need? How Agent Harnesses Reshape Agentic Search》 — delivered a loud slap to that myth.

It tells us: in the top AI coding assistants (like Claude Code or Gemini CLI), the ancient command grep, born in the 1970s, turns out to be more reliable than modern AI retrieval.

Why Does "Semantic Search" Lose to "Keyword Search"?

In theory, AI should understand meaning. If I search for "fix a bug," vector retrieval should find related documents like "resolve errors" or "handle exceptions."

But in real agentic work (like AI writing code for you), this "understanding" becomes a weakness:

1. Semantic search is too "sensitive"

When you tell the AI: "Find that file that handles payment logic." Vector retrieval might decide that "finance," "salary," and "reimbursement" are semantically close, and stuff all these messy distractors into the AI's brain. This is called "semantic interference."

grep, by contrast, coldly returns only the lines containing payment_logic. The AI can see the truth at a glance.

2. The interference of "historical baggage"

Today's AI assistants often carry very long conversation histories. Vector retrieval is frequently led astray by irrelevant chatter from earlier in the session, missing the currently relevant clues. Experiments show that grep demonstrates astonishing resilience against this kind of noise.

The "Saddle" Reshapes the "Horse"

The paper's most central point: the Agent Harness changes the rules of the game.

Previously, AI was just a chat box — you handed it a pile of fuzzy documents and asked it to summarize.

But today's AI assistants (agents) have their own "hands" and "eyes" (i.e., CLI tools, terminal environments). In this environment, AI no longer needs to be passively fed "relevant snippets." It behaves more like a skilled worker, able to actively launch precise "radar scans."

Give the AI a grep tool, and it can instantly locate that specific variable within 100,000 lines of code. That is far more efficient than guessing at semantics for a long time.

Why Is This Very "Feynman"?

Feynman once said: "You must start from first principles; don't trust something just because it looks modern."

To some extent, this paper is a return to first principles. It reveals that in complex intelligent systems, deterministic foundational tools are often more lethal than probabilistic advanced ones.

To summarize:

We are entering an era of "back to basics." The super AI of the future may not be wandering mystically through cloud-based thought, but instead, like a seasoned Unix hacker, holding grep in its left hand and sed in its right, hunting with utmost precision through a forest of deterministic logic.

The next time you feel AI retrieval isn't accurate enough, try giving it this ancient "Stone Age" tool. You may be surprised to find that the sharpest knife is often the old steel blade honed over decades.

Wisdom has no rank; what works is what wins. This is 2026's basin of cold, sobering water thrown over the feverish AI industry.

---

*Reference: arXiv paper "Is Grep All You Need? How Agent Harnesses Reshape Agentic Search" (May 2026)*

Tags

#ai-agents#grep#vector-search#semantic-search#agentic-search#claude-code#gemini-cli#first-principles

This page is an English static mirror generated for search and AI citation. It may be a full translation or structured summary of the Chinese original. Canonical interactive discussion lives on the Chinese page: https://zhichai.net/topic/177620101