Developer Tools · September 1, 2026
Blast Radius: Preventing Breaking Changes Before an AI Agent Refactors
An AI agent asked to rename or change the signature of a shared function has no built-in sense of how widely it's used. Without that context, it either refactors too cautiously (leaving stale callers) or too confidently (breaking three services it never read). blast_radius exists to answer one question before the edit happens: if I change this symbol, what will break?
What It Actually Traces
Given a symbol name, the tool runs the same reference index used by find_callers — up to 50 matches — then groups the results by file and cross-references find_tests_for to surface every test suite that should be re-run:
$ codive blast GenerateToken
💥 Blast Radius Analysis for 'GenerateToken':
• Risk Level: HIGH (5 direct callers across 3 files)
• Affected Files:
- internal/auth/token.go
- internal/cmd/login.go
- internal/mcp/server.go
• Tests to Run:
- internal/auth/token_test.go
- TestGenerateToken_ExpiredClaims
The Risk Level Is Not a Guess
The LOW/MEDIUM/HIGH label isn't a model's subjective judgment — it's computed directly from the caller count and file spread returned by the index:
riskLevel := "LOW"
if len(affectedFiles) >= 3 || len(refs) >= 5 {
riskLevel = "HIGH"
} else if len(affectedFiles) >= 2 || len(refs) >= 2 {
riskLevel = "MEDIUM"
}
| Risk | Trigger | What it usually means |
|---|---|---|
| LOW | <2 files, <2 callers | A locally-scoped function or one used from a single call site — safe for a direct edit. |
| MEDIUM | ≥2 files or ≥2 callers | Used across a couple of modules — worth reading the callers before editing the signature. |
| HIGH | ≥3 files or ≥5 callers | A shared API contract — the tool's output becomes the checklist for what to verify after the change. |
Because the thresholds are fixed and deterministic, the same symbol always gets the same risk label across sessions — which matters for an agent workflow where the previous turn's "HIGH risk, 3 files" assessment needs to still be true when the agent circles back to it two turns later.
Namespaced Symbols
Some languages (Java in particular, via Spring annotations and qualified method references) pass symbols in a package:Symbol or Class:method shape. blast_radius strips everything up to the final : before querying the reference index, so com.example.service.PaymentService:processPayment and a bare processPayment resolve to the same underlying lookup.
blast_radius before the edit, then the CLI's codive diff (or the MCP get_git_changes tool) after, to confirm the actual diff only touched the files the blast-radius analysis predicted. If it touched something outside that list, that's the signal to double-check the change.