---
title: "Blast radius: how to know what a code change breaks before you make it · Cork"
description: "Find a code change's blast radius before you make it: callers via LSP and git grep, dependents with Nx or Turborepo, history, tests, and teammates' work."
canonical: "https://corkcli.com/blog/blast-radius-code-change"
last_updated: "2026-10-03"
published: "2026-10-03"
author: "Kevin Vera"
---

# Blast radius: how to know what a code change breaks before you make it

Find a code change's blast radius before you make it: callers via LSP and git grep, dependents with Nx or Turborepo, history, tests, and teammates' work.

By Kevin Vera · October 3, 2026 · [Guides](https://corkcli.com/blog/c/guides) · 6 min read

The [blast radius](https://corkcli.com/blog/blast-radius) of a code change is everything that can break because of it: the direct callers of the function you change, the code that depends on those callers, the packages that import it, the tests that exercise it, and any work in progress by teammates or other agents that assumes the old behavior. To know it before you make the change, list the callers with your language server or a search, expand to dependent packages with your build tool's graph, read the recent history of the code, find the tests that cover it, and check who else is changing that code right now. AI coding agents need this more than people do, because they edit fast and rarely look beyond the file they were asked to change.

## Step 1: find direct callers by symbol, not by text

Start with who calls the function or uses the type. A language server's "find references" is the most precise tool because it understands imports, aliases and overloads. Agents can use it too: Claude Code's code intelligence plugins connect it to a language server so Claude finds definitions and references by symbol instead of by text search, and gets diagnostics after each edit. Install the server binary, then the plugin, for example:

```text
/plugin install typescript-lsp@claude-plugins-official
```

When no language server is available, a text search is the fallback:

```bash
git grep -n "sendInvoice(" -- '*.ts'
```

Text search finds false positives (comments, same-named functions) and misses dynamic calls (string-based dispatch, reflection, dependency injection), so read the results rather than counting them.

## Step 2: expand to dependents

Direct callers are the first ring. If any of them are exported, their callers are in the blast radius too. In a monorepo, let the build tool walk the package graph:

```bash
# Turborepo: run tests for a package and everything that depends on it
turbo run test --filter=...@acme/billing

# Nx: run tests for projects affected by the current changes
nx affected -t test
```

Turborepo's leading ellipsis selects dependents; Nx uses git to find changed files, maps them to projects, and follows the project graph to dependents. For public APIs, the outer ring also includes code you cannot see: other services, clients and customers. Changes there need deprecation, not just a search.

## Step 3: read the history of the code

Recent history tells you how stable the code is and who else cares about it. Git can show every change to one function:

```bash
git log -L :sendInvoice:billing/invoice.ts
```

Look for recent signature changes, reverts, and commit messages that explain constraints ("keep arguments in this order, the webhook relies on it"). A function changed three times this week by three different people is a hot spot; changing it again without talking to them is how conflicts start.

## Step 4: find the tests that cover it

The blast radius you can verify is the part with tests. Find the tests that exercise the code (search test files for the symbol, or use coverage output to map lines to tests) and run them before and after the change. If the callers you found in steps 1 and 2 have no tests, either add them first or treat those callers as unverified risk and say so in the pull request.

## Step 5: check live work by others

Everything above looks at committed code. With several agents or teammates working at once, part of the blast radius is not committed yet: a teammate's branch that adds a new call to the function you are about to rename, or an agent halfway through editing the same function. Ways to see it:

- Open pull requests that touch the same files (`gh pr list` plus `gh pr diff <n> --name-only`).
- A shared record of who is changing what, checked by a pre-edit hook in your agent (Claude Code, Codex and Cursor all support hooks that run before an edit and can block it).
- Messages between agent sessions when one changes something others depend on.

## Make agents do this automatically

Agents skip blast-radius checks unless told. Put the routine in your instruction file (`AGENTS.md` or `CLAUDE.md`):

```markdown
Before changing an exported function or type:
1. Find all references (use the LSP tool if available, else git grep).
2. If it lives in packages/shared, run: turbo run test --filter=...<package>
3. Update every caller in the same change, or keep the old signature.
4. List the callers you checked in the commit message.
```

The checklist works best when the agent already has the caller list in front of it rather than having to search for it each time, which also saves tokens.

## How Cork helps

Cork delivers the blast radius before the agent asks. When an agent starts or gets a prompt, it is briefed with the exact signatures, callers and recent changes of the code it is about to touch, and the `blast_radius` and `get_symbol` MCP tools are there when it needs more. Step 5 is covered live: when another agent changes code yours depends on (a rename, a new signature), your agent hears it on its next step; a write gate holds an edit against code another agent is changing right now until your agent has their version; and a teammate's rename or signature change becomes a [semantic lint](https://corkcli.com/blog/semantic-lint) rule your agents are checked against. Cloud plans add a live code graph of the repo. This works with Claude Code, Codex and Cursor through hooks with no extra model calls.

Cork is the [coordination layer](https://corkcli.com/blog/coordination-layer-ai-coding-agents) for multiplayer coding agents: it keeps Claude Code, Codex and Cursor agents, on one machine or across a team's machines, from overwriting each other on one codebase, and hands each agent what the others already learned.

```bash
curl -fsSL https://corkcli.com/install.sh | sh
```

## Frequently asked questions

### What does blast radius mean in software?

It is the set of code, tests, services and people that a change can affect if it goes wrong: direct callers, their dependents, and anything relying on the old behavior.

### How do I find all callers of a function?

Use your language server's find references, which understands imports and aliases. Fall back to `git grep`, and check for dynamic calls that text search cannot see.

### How do I know which tests to run after a change?

Run the tests for the changed code and for its dependents. In a monorepo, `turbo run test --filter=...<package>` or `nx affected -t test` selects them from the package graph.

### Can AI coding agents check blast radius on their own?

Yes, if they have the tools and the instruction to do it: a language server integration, a test command for dependents, and a rule in `AGENTS.md` or `CLAUDE.md` that requires the check before changing exported code.

## Sources

- <https://code.claude.com/docs/en/plugins/code-intelligence>
- <https://git-scm.com/docs/git-log>
- <https://turborepo.dev/docs/reference/run>
- <https://nx.dev/docs/features/ci-features/affected>
- <https://cli.github.com/manual/gh_pr_diff>
- <https://code.claude.com/docs/en/hooks>
- <https://learn.chatgpt.com/docs/hooks>
- <https://cursor.com/docs/agent/hooks>

## Related reading

- [Blast radius in code: everything a change can break](https://corkcli.com/blog/blast-radius): The blast radius of a code change is the set of callers, dependents, tests and teammates' work that the change can affect, used to judge risk before editing.
- [How to land agent changes in one step: rebase, test and push](https://corkcli.com/blog/land-agent-changes-rebase-test-push): Land AI agent commits in one step: fetch, rebase onto teammates' work, rerun tests and push, using a script, a pre-push hook or a merge queue.
- [Agent briefing: the context an AI coding agent gets before it starts](https://corkcli.com/blog/agent-briefing): An agent briefing is the targeted context an AI coding agent gets before it works: signatures, callers, recent changes and notes for the code it will touch.
- [From one machine to a team: moving from Cork Free to agent hours](https://corkcli.com/blog/cork-free-to-team): Move from Cork Free to agent hours: what changes when agents on teammates' machines see each other, how cork login and cork upgrade work, and what it costs.

[All articles](https://corkcli.com/blog.md) · [Cork in Markdown](https://corkcli.com/index.md) · [llms.txt](https://corkcli.com/llms.txt)

This page in HTML: https://corkcli.com/blog/blast-radius-code-change
