Better tools made Copilot code review worse. Here’s how we actually improved it.

Replacing Copilot code review’s internal tools with the shared CLI suite initially caused a drop in issue detection and a spike in…

By AI Maestro July 10, 2026 2 min read
Better tools made Copilot code review worse. Here’s how we actually improved it.

Replacing Copilot code review’s internal tools with the shared CLI suite initially caused a drop in issue detection and a spike in review costs.

The problem was not the tools

The team expected a clean upgrade when swapping in the better-maintained utilities that power the Copilot CLI. They anticipated a win, but benchmarks showed the opposite.

The regression was not technical. It was a workflow mismatch. The instructions given to the agent told it to behave like a general coding assistant rather than a code reviewer.

How the agent was behaving

The agent treated the pull request like a general repository. It would search broadly, guess likely paths, and read large chunks of code to build context. This is standard behaviour for a coding assistant mapping a whole area before making changes. It is not how a reviewer works.

A reviewer starts from the diff and asks targeted questions:

  • Where is this function called?
  • Is this config key used anywhere else?
  • Is there a test or helper with the same pattern?
  • What is the smallest nearby code range that explains this behavior?

Extra file contents carry forward into the agent’s working context. Every tool result adds tokens to the window. Overloading the review with unrelated code increases cost and dilutes focus.

Fixing the instructions

The team rewrote the guidance to match a reviewer’s specific workflow. The new rules are:

  1. Start from the diff and form specific review questions.
  2. Use glob only when the path is uncertain and grep to find candidate files.
  3. Batch cheap discovery before reading files.
  4. Use view only when the agent knows which file or line range it needs.
  5. Batch focused reads instead of alternating between one search and one read.

In practice, the agent now narrows first with grep and glob. It reads exact evidence with view. If grep fails, the agent retries with a simpler escaped search. If a path is wrong, it pivots to glob instead of guessing nearby paths.

For example, if the diff changes an authorization helper, the agent asks: “are any request-handling callers relying on the old behavior?” It does not ask for the full contents of every file that calls the helper.

The intended path is short:

start from the helper changed in the diff 
grep for callers of that helper 
glob for likely route, handler, or controller files 
view the most relevant caller ranges 
decide whether any caller changes the risk

What it means

Adjusting the instructions for the shared tools resulted in roughly 20% lower average review cost while maintaining the same review quality. The fix shows that shared infrastructure works well when the prompts match the specific task.

Scroll to Top