← Back to blog
·4 min read

Verifying an AI coding agent's refactor: check the callers it says it updated

When an AI agent says it updated every caller, treat it as a claim. blastline check asks a code graph what still references the symbol, with file:line proof.

ai-agentscode-intelligencedeveloper-tooling

A symbol sits at the center of a web of dashed incoming references; one caller at the lower left glows amber on a solid line, the reference that would have been missed.

When a coding agent finishes a rename and reports "I updated all the call sites," that sentence is a claim, not a fact, and it can be checked. blastline check, part of our open-source Blastline tool, asks a CGraph code graph what still references the symbol and prints every hit with file:line. It is built to prove the claim wrong, and it is deliberately incapable of proving it right.

The problem

Most change-analysis tools are diff-driven. They start from "here is a change" and answer "what does it reach," which is the right shape for CI, where a diff already exists. An agent in the middle of a refactor has an earlier question: before I finish changing this symbol, does anything depend on it that I haven't handled? That question is about a symbol, not a diff, and until now the only way to ask it was to open a pull request and read the review afterwards.

Grep is the usual stand-in, and it fails in a predictable way: it finds text that looks like a call. It misses a module that re-exports the function, an import that forwards it, anything that references it without the call syntax. Those are exactly the references a rename breaks.

What we did

check moves that question before the edit:

blastline check callers <symbol> [--exclude <symbol>...] [--transitive]

The symbol can be given as file:line, file:label, or a bare name, because those are the three forms an agent actually has on hand. --exclude names the callers the agent already handled, so the question narrows to the one it is really claiming: there is no other caller.

Here is Blastline run on its own source, during a real rename of a function to nodesInFile:

$ blastline check callers nodesInFile
verdict: refuted
imports    file     src/graph.test.ts   (src/graph.test.ts:1)
CALLS      function resolveSymbol      (src/graph.ts:121)
re_exports file     src/index.ts        (src/index.ts:1)
imports    file     src/mapping.ts      (src/mapping.ts:1)
CALLS      function mapDiffToSeeds     (src/mapping.ts:28)
imports    file     src/seam.test.ts    (src/seam.test.ts:1)

Graph of the six references to nodesInFile: two CALLS edges from resolveSymbol and mapDiffToSeeds, imports from graph.test.ts, mapping.ts and seam.test.ts, and a highlighted re_exports edge from index.ts that a grep for the call syntax would miss.

Every row names the relation that produced it. CALLS is a call site the edit has to account for; imports and re_exports are file-level references that break differently and matter for a rename. The re_exports edge through src/index.ts is the one a search for the old call syntax misses: that file forwards the function and never calls it. The rename shipped as Blastline #13 with this check in the commit that made it.

The decision: a falsifier, never a certifier

The choice that matters is what check says when it finds nothing. A code graph can't see dynamic dispatch, reflection, or macros, so "found callers" and "found none" are not equally strong statements, and the tool doesn't pretend they are.

Diagram of the three answers blastline check can give: refuted, when callers remain beyond the excluded set, which is authoritative; no-static-callers, which is not a certificate that the change is safe; and UNVERIFIED, when the symbol is not in the graph, which fails open.

Verdict When What it means
refuted References remain beyond the excluded set Authoritative: these callers exist and the claim was wrong
no-static-callers The graph sees no other reference Not "safe to delete," only "the graph can't see one"
UNVERIFIED The symbol can't be resolved Fails open, so an empty answer is never mistaken for a clean one

The alternative we rejected was the one that reads best in an agent transcript: return "all callers updated" when the list comes back empty. That turns the tool's blind spots into false confidence, which is worse than no check at all. A tool that tells you when you're wrong and stays quiet about when you're right can be acted on without being trusted.

For agents, the same query runs over MCP (blastline mcp serves blastline_check), and every answer carries the graph's content hash, so a check run against a stale index can be detected.

Where it stops

The boundary is real, and we measured it. Benchmarking against ripgrep, reverting a flag change fails 14 tests in tests/index/disallowed.rs. Those tests genuinely depend on the change, but they run the built rg binary as a subprocess rather than calling any function, so there is no edge to find, and no extractor improvement will ever produce one. That is the reason check refutes rather than certifies.

Takeaway

The useful question about an agent doing refactors in your codebase isn't whether it is usually right. It is whether you can tell when it isn't. If you're putting coding agents into a real engineering workflow and want that answer to be yes, that's the kind of AI engineering work we do, and both tools are MIT-licensed if you'd rather start on your own.

Building something like this?