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

[Github](https://yomu.fyi/company/github) · Napalys Klicius · Jul 10, 2026

**Type:** Problem & solution

## Summary

When migrating GitHub Copilot code review from custom navigation tools to shared Unix-style CLI utilities—grep, glob, and view—benchmarks revealed higher review costs and fewer caught issues. Rather than an issue with the underlying tools, trace analysis showed the agent used general-purpose coding assistant instructions that triggered expansive repository browsing loops. In response, the team rewrote the tool guidance to enforce a review-specific workflow anchored to pull request diffs. The updated instructions direct the agent to narrow candidate call sites and files using batched discovery before reading minimal line ranges with view. This workflow tuning reduced average review costs by approximately 20% in production while maintaining review quality.

## Context

Migrating Copilot code review to shared Copilot CLI code exploration tools caused higher token costs and fewer caught issues because general-purpose assistant prompts led the agent to browse repositories broadly instead of investigating diff evidence.

## Approach / What changed

Rewriting the tool instructions to follow a review-specific workflow that anchors to the pull request diff, batches cheap discovery via grep and glob, reads minimal line ranges with view, and prevents guessing paths on search failures.

## Takeaways

- Retaining broad tool output inside an LLM's working context inflates token usage and degrades focus across subsequent reasoning steps.
- Restructuring tool guidance to prioritize diff-anchored discovery before focused reads lowered average review costs by roughly 20% while maintaining review quality.
- Tool prompt optimizations tailored to pull request reviews failed to produce identical wins in the Copilot CLI, where broad interactive exploration remains necessary.

**Tags:** [Code Review](https://yomu.fyi/topic/code-review), [Developer Experience](https://yomu.fyi/topic/developer-experience), [LLMs](https://yomu.fyi/topic/llm), [Performance](https://yomu.fyi/topic/performance)

[Read original post](https://github.blog/ai-and-ml/github-copilot/better-tools-made-copilot-code-review-worse-heres-how-we-actually-improved-it)
