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

Napalys Klicius10 Jul 2026

Problem

Teams with several agent products often share one tool layer. GitHub moved Copilot code review from its own code exploration tools to the shared tools of the Copilot CLI (grep, glob, view). In offline benchmarks the average review cost went up and the number of useful comments went down. Every tool result stays in the agent's context window, so extra output makes later steps costlier and less focused.

Example from the article: the diff changes an authorization helper. The useful question is "are any request-handling callers relying on the old behavior?", not "show me every file that calls this helper".

Solution in brief

The tools were fine; their instructions were written for an interactive coding assistant, so the agent browsed the repository. The team read benchmark traces, then rewrote the instructions for a reviewer's workflow: start from the diff, narrow with grep and glob, read only focused ranges with view. Production showed roughly 20% lower average review cost with no quality signal that could block shipping.

Questions this case answers
  • How to cut the cost of an LLM agent's tool use without losing output quality when a shared tool set is reused for a narrower task
  • How to diagnose from execution traces why an agent's cost grew after a change in its tools
  • How to reuse a shared set of agent tools in a new product without raising the cost per run?
  • How to find out from traces why an agent got more expensive after a tool swap?

Tools and methods

  • Benchmark traces — show which tools the agent called, how much output came back, where errors happened, and whether the search narrowed or widened
  • Review-shaped tool instructions — a prompt that fixes the order: diff, question, narrow search, focused read
  • GitHub Copilot — the product; code review and the CLI share the grep, glob and view tools
Continue reading — it's free

Google or a one-time email code. No password.