By Abhijith N M · Reviewed 24 October 2026 · Editorial standards
A reviewer asks an agent why the nightly job is slow. The agent reads about two hundred files and returns eight confident paragraphs. It says the job waits on a join with no index. The reviewer wants to confirm that before approving a fix, then notices there is no file name and no line number anywhere in the reply. Checking the claim by hand takes longer than the analysis did.
The summary is not useless. It is unverifiable, and for review that is worse than useless. A claim with a location takes seconds to check. A claim without one sends the whole search back to the person who asked.
Grep searches file contents for a pattern and returns matching lines with their file and line number. Glob matches file paths against a pattern, so you can list candidates without reading them. Read returns the text of a file, or a window of it.
| Tool | The question it answers | Use it when |
|---|---|---|
| Grep | Where does this name or string appear? | You have a symbol, an error message or a config key |
| Glob | Which files exist at this path shape? | You know the module layout but not the file names |
| Read | What does this file say? | You already have a path and a line range |
The order matters, because the costs differ. Grep and Glob spend a few hundred tokens and return locations. Reading spends thousands of tokens and returns text. Narrow first, then read the window you need. A search with twelve hits is a decision point: read the three that matter, not all twelve.
An Explore subagent is a subagent with one job: search, read a little, and return locations plus a short brief. It does not write the final answer. Keeping it narrow is the same isolation rule you applied to orchestration: give a subagent a small, relevant context, and take back a small, relevant result.
A module is a directory or package whose files change together. One pass per module beats one pass over three hundred files. Each pass asks one question and returns its own citations. A merge step then builds a table of module, question, citation and finding. Record the modules that produced no hits as well. An empty result is evidence, and it stops the next reviewer from searching the same place.
Human review is a product, not a backstop. Three parts decide whether it works.
The reason field on a rejection is the cheapest improvement you can make. A rejection without a reason teaches the agent nothing and cannot be measured.
This snippet turns search hits into citations with file paths and line ranges, and reports the size of the window it read. Grep output is simulated so the example runs without a repository.
from dataclasses import dataclass
@dataclass
class Citation:
path: str
start: int
end: int
note: str
def label(self) -> str:
return f"{self.path}:{self.start}-{self.end}"
@dataclass
class Scope:
question: str
citations: list[Citation]
def lines(self) -> int:
return sum(c.end - c.start + 1 for c in self.citations)
# Stand-in for Grep output: the search ran before anything was read.
hits = [
("app/jobs/nightly.py", 41, 58, "the only caller of the slow query"),
("app/db/queries.py", 12, 19, "joins a table with no index"),
]
scope = Scope(
question="why is the nightly job slow?",
citations=[Citation(*hit) for hit in hits],
)
for citation in scope.citations:
print(citation.label(), "|", citation.note)
print("lines read:", scope.lines())A false positive, in a review queue, is a change the reviewer approved that should have been rejected. A false negative is a good change the reviewer rejected. Both are errors, and they cost different things. Decide which one your team can afford, then tune the queue towards the other.
| Metric | How to get it | What it tells you |
|---|---|---|
| False positive rate | Audit a random sample of approvals against the incidents that follow | Whether the queue lets harm through |
| False negative rate | Audit a random sample of rejections with a second reviewer | Whether the queue is wasting good work |
| Median time per item | Measure the median, not the average | Whether the view gives a reviewer enough to decide |
Take one agent-generated change, or write a small one, and build the review packet: the claim, three citations with path and line range, the diff, and the tool results. Ask a colleague to decide in under two minutes and to say which line they used. Then write the two numbers you would track: a sampled false positive rate and the median time per item. You are done when your colleague can point at the line that supports every claim, and your two metrics are defined well enough for someone else to collect them.
Key takeaways
Narrow with Grep and Glob before you pay for Read; locations are cheaper than text.
Delegate exploration to an Explore subagent that returns citations and a short brief.
Chunk the work by module, and record the modules that produced no hits.
A summary without file paths and line ranges cannot be reviewed, so require citations on every claim.
Measure false positives and false negatives on a sampled audit, not approval rate alone.
Written and edited by the nexGenCoders team. Spotted a mistake? Tell us and we will fix it.
Don't lose this lesson
Create a free account to save your progress, keep your streak, and work toward a shareable certificate.