Most code-graph problems trace back to one of two things: a stale graph, or asking the wrong query for the question. This guide walks through the common symptoms and how to resolve them.
Results look out of date
If vg show, vg impact, or vg tree describe code that no longer matches reality, the graph is stale. Rebuild and try again:
vg build
vg show
Because builds are incremental, this is quick and is the fix for the majority of "that's not right anymore" cases.
A node or edge seems missing
If an expected function or relationship is absent, confirm you built from the correct location. Building from the repository root captures the whole project, including cross-package edges in a monorepo. If you built from a subdirectory, rebuild from the root:
vg build
Then rebuild after any recent changes so newly added code is included.
vg path returns nothing
An empty path means the two endpoints are not connected in the direction you chose. Try:
- Reversing the endpoints — swap which node is A and which is B.
- Re-checking your assumption that the two nodes are related at all.
- Confirming both endpoints exist in a freshly built graph.
vg path --pick-a --pick-b
The call tree is overwhelming
If vg tree produces too much output, bound the traversal with depth, and flip direction only when needed:
vg tree --depth 2
vg tree --callers --depth 2
Impact radius looks wrong
Impact reflects the graph at build time. If the blast radius seems off, rebuild first, then re-run:
vg build
vg impact
Remember that distant dependents carry lower confidence by design — a large radius is a planning signal, not necessarily an error.
vg ask returns irrelevant context
Rephrase the question to focus on behavior and relationships, and rebuild if the code changed. If you already know the node, prefer vg show for precision over a broad question.
General checklist
- Rebuild with
vg buildfrom the repository root. - Pick the query that matches the question — show, ask, impact, path, or tree.
- Bound traversals with
--depth. - For paths, verify endpoints and direction.
Related
See the articles on keeping your code graph up to date, interpreting impact output, and graph performance and incremental builds.