Last month a team asked Claude Code to refactor their payments module.
On paper the agent nailed it:
- Touched 18 files
- Unit tests passed
- CI green
After release: webhook callbacks were wrong — six hidden call sites never made the edit list.
That is not a Claude-only bug. Cursor, GitHub Copilot, and Windsurf AI coding agents hit the same wall: they read files, they do not reliably model how code connects.
That is why CodeGraph spread fast in 2026: a local, queryable code knowledge graph, wired through MCP so Claude Code runs impact analysis before editing. Below we match real search intent — Claude Code missed edits, Cursor Composer, MCP, CodeGraph — and why indexing often lives on a Cloud Mac.
Why Claude Code misses edits
Searches like Claude Code missed edits or Claude Code monorepo are not about IQ — they ask why one change did not propagate.
Claude Code Reads, Greps, edits many files, runs tests — smooth until the repo is a graph:
- Rename a public method — an extension conformance in tests never surfaces in retrieval.
- Change a protocol field — mobile mocks, jobs, and webhooks live in different corners.
- Forty files in context — file forty-one with an indirect reference may not be.
Hence build green, tests green, production red. AI coding hurts when editing, not when drafting features. Claude Code vs Cursor differ in UX; missed edits share one cause: no deterministic blast-radius query.
Why Cursor Composer needs a code knowledge graph
Cursor Composer shines at large diffs — great for UI sweeps. Changing public APIs, payment contracts, or cross-package deps still depends on "which files showed up in search." Semantic recall alone produces the same Cursor missed edits as Claude Code.
A code knowledge graph turns "who calls PaymentService?" into traversable edges, not "sounds similar." Teams often share one .codegraph index: codegraph install --target=claude,cursor so IDE and terminal agree on the must-touch list.
Three diagrams: plain agent vs CodeGraph agent
Original figures for this article (save or share internally).
PaymentService, the graph lists WebhookHandler, BillingAPI, AdminPanel, and other referencers
What is CodeGraph? (if the name is new to you)
CodeGraph (colbymchenry/codegraph) indexes locally with tree-sitter, stores symbols and calls / imports in .codegraph/codegraph.db. It does not replace Claude Code or Cursor; it adds a repo map so an AI coding agent can ask: "If I change this symbol, who else moves?"
Common tools: codegraph_impact, codegraph_callers, codegraph_trace. For iOS / Swift shops, impact beats grep when protocols or SPM boundaries shift — extensions and cross-target references land on the list.
When teams standardize on CodeGraph
You do not need a graph on day one for a throwaway script. It becomes the default when:
- The repo crosses multiple packages, apps, or Xcode targets and edits routinely span more than ten files.
- Incidents look like "tests passed, staging caught a webhook" — classic missed blast radius.
- Both Claude Code and Cursor touch the same monorepo and need one shared must-edit list.
That is the profile where CodeGraph stops being a nice experiment and becomes part of your AI coding checklist — next to CI, code review, and a fixed macOS build host.
How MCP lets Claude Code call CodeGraph
Searches for Claude Code MCP and CodeGraph MCP point to Model Context Protocol: graph queries become tools in the session, not pasted terminal dumps.
- Install the CodeGraph CLI.
- Run
codegraph install --target=claude,cursor --yes. - At repo root:
codegraph init -i. - In
CLAUDE.md: call codegraph_impact before public API changes.
Ask Claude Code to refactor PaymentService.charge — it can pull the file list via MCP first. You move from "blindly editing 18 files" to "touching 24 on purpose, webhooks included."
codegraph init -i codegraph install --target=claude,cursor --yes codegraph impact "PaymentService.charge" --depth 3
Large-repo indexing: many teams use Cloud Mac
A full codegraph index hammers CPU and disk; 100k+ line trees often need tens of minutes. On a MacBook that competes with Claude Code and Xcode.
So teams increasingly:
- Run
codegraph init -ion a Cloud Mac always-on node. - Schedule it beside
xcodebuildandpnpm teston the same self-hosted runner. - Let local AI coding agents query only — not rebuild the whole graph daily.
Graph version aligns with build and test environments — Claude Code and Cursor do not plan against stale structure. See Cloud Mac plans.
Index next to builds
Indexing is CPU- and IO-heavy. Running it on the same macOS host as Xcode builds avoids "local graph from yesterday, CI from today" — common in Swift multi-target repos.
RAG, grep, huge context: why none carry the job alone
| Approach | Good at | Blind spot when editing |
|---|---|---|
| Vector RAG | Semantically similar chunks | True callers may not "sound alike" |
| Grep | Literal matches | Indirect calls, dynamic dispatch, codegen |
| 200K+ context | Many files at once | Still miss reads; expensive |
| CodeGraph | Symbol-level impact / callers | Index upkeep; overkill on tiny repos |
Mature stack: CodeGraph scopes files → RAG adds product context → Claude Code / Cursor edit → tests verify.
Workflow: Claude Code + CodeGraph
- Build
.codegraphon Cloud Mac or locally. - Before payment/auth/public API changes:
codegraph impactor MCP tools. - Edit against the list, run tests; optionally refresh index on PR.
- Pair with Mac mini + Claude Code: query locally, index remotely if you prefer.
Install commands, MCP JSON, before/after
Step-by-step install, monorepo walkthrough, more FAQ:
Why Does Claude Code Keep Missing Edits? GitHub's CodeGraph Has an Answer (2026)
This piece is the why and search angles; the linked article is how to install and wire MCP.
FAQ
How is CodeGraph different from Sourcegraph?
Sourcegraph is enterprise code search for humans in the browser. CodeGraph targets AI coding agents: local SQLite, no source upload, MCP tools like impact for Claude Code and Cursor. Use both: humans search Sourcegraph, agents query CodeGraph before edits.
Does CodeGraph work with Swift?
Yes. tree-sitter parses Swift for iOS/macOS multi-target and SPM/Xcode trees. Run impact before changing protocols or shared services — fewer missed extensions, previews, and test targets. A frequent ZavCloud customer pattern.
Can CodeGraph run with Claude Code?
Yes — recommended. After codegraph install, agents call codegraph_impact in-session, or you run CLI first and paste results.
Does CodeGraph require MCP?
CLI works alone. For automatic graph lookups inside Claude Code and Cursor agent mode, use MCP. One install can configure both.
Why does Claude Code miss edits? (one line)
It reads files, not relationships; public-symbol changes need a deterministic impact list.
Why does Cursor Composer need a knowledge graph?
Large diffs still skip indirect callers; shared CodeGraph index = one must-edit checklist.
Index on Cloud Mac or laptop?
Small repos: laptop is fine. Large Swift/Xcode trees: index on Cloud Mac, query locally.
- Related— Claude Code vs Cursor · Claude Code ecosystem
ZavCloud · Cloud Mac
Run CodeGraph indexing on Cloud Mac; let Claude Code edit
Align index, Xcode builds, and MCP — agents work from today's graph, not yesterday's snapshot.
View Cloud Mac plans