← Back to research
•·7 min read·company

CodeGraph

CodeGraph gives coding agents a local SQLite graph of source relationships. Version 1.6 adds Copilot integration; telemetry and context costs need attention.

By Ry Walker, founder of Tembo and Astronomer.

Represent this profile? Claim it or send a correction.

Key takeaways

  • CodeGraph combines a local SQLite index, file watching, and MCP queries for code structure.
  • Version 1.6.0 adds GitHub Copilot integration, project-local Codex setup, and response deduplication.
  • Fewer processed tokens can coexist with a larger resident context footprint; benchmark the full session.
  • Usage telemetry is enabled by default with an opt-out; local code indexing is not the same as zero network traffic.

FAQ

What is CodeGraph?

Colby McHenry's MIT-licensed CLI and MCP server indexes code relationships locally so coding agents can query structure and source context.

Is CodeGraph free?

The local software is MIT-licensed without a usage fee. Coding-agent model charges and local compute still apply; the advertised hosted platform remains a separate forthcoming offering.

Does CodeGraph send code to a service?

The telemetry policy excludes code, paths, and queries, but does collect usage statistics by default. Connected coding agents have their own data handling, and the MCP server also checks for updates.

Does CodeGraph always save tokens?

No general guarantee follows from its benchmarks. Its own multi-turn measurements show that retrieved source can occupy more persistent context even when fewer tokens are processed overall.

Executive Summary

CodeGraph, the project maintained by Colby McHenry on GitHub, stores source relationships in a local SQLite graph. Coding agents query it over MCP, and file watching updates the index as source changes. It is one option in the code intelligence tools comparison.[1]

The important change since June is a shipped v1.6.0 release, plus clearer evidence about costs beyond a tool-call count. The project now publishes multi-turn context measurements, and its telemetry policy explicitly documents outbound usage collection. This review checked sources on September 15, 2026; it did not run CodeGraph benchmarks.[2][3][4]

AttributeVerified position
Stable releasev1.6.0, August 26, 2026[2]
LicenseMIT, with its copyright and permission-notice requirements[5]
DeploymentLocal CLI, MCP server, and browser graph viewer[1]

Product Overview

The current architecture combines a TypeScript application with a native Rust extraction kernel for 20 languages and a portable fallback. Tree-sitter supplies parsing, SQLite stores relationships and full-text search, and native filesystem events drive incremental updates. The project documents coverage for more than 30 languages overall; language count is not a guarantee of equal semantic accuracy.[1]

Version 1.6.0 adds Copilot setup across VS Code, its CLI, and JetBrains, along with project-local Codex configuration and a noninteractive install-and-index flow. It also adds source deduplication within a conversation, repairs index drift and a write-ahead-log disk leak, and requires reindexing after upgrade to incorporate its fixes.[2]


Architecture and Daily Workflow

The schema stores symbols with names, types, source locations, and signatures; edges connect symbol IDs, while file records track content hashes and indexing state. Unresolved references have their own records for later resolution. This explains the useful distinction between finding a name and following a relationship: a graph answer depends on extraction and resolution, not just text matching. [6]

SurfaceWhat it is for
CLI setupcodegraph install configures an agent; codegraph init builds the project's local index
Agent retrievalcodegraph_explore returns selected source, call paths, and an impact summary
Direct inspectioncodegraph ui displays an existing index; CLI commands support specific queries and status checks

Setup and inspection commands come from the CLI; the retrieval contract comes from the MCP instructions. Installing the agent integration does not, on its own, index each repository. [7][8]

For an unfamiliar request path, a practical workflow is to initialize the project, ask codegraph_explore how the named entry point reaches the target, then inspect the returned source and relationships before editing. Pass projectPath when querying an indexed subproject. After edits, read the staleness banner and check the changed files if synchronization is pending. The current agent instructions call cross-file resolution best-effort and reserve correctness checks for the compiler, tests, and linter. [8]

The current source exposes codegraph_explore alone by default. Narrower tools remain available through configuration or the CLI. It also makes cross-call source deduplication opt-in with CODEGRAPH_EXPLORE_DEDUP=1, appropriate only when the host preserves one durable conversation per connection. A fresh subagent or compacted context may need source that an earlier caller already received. Check the installed release's defaults when interpreting the v1.6.0 deduplication announcement. [8]


Performance Evidence

The current README reports an August 5, 2026 vendor test across seven repositories: one architecture question per repository, headless Claude Code, four runs per arm, and a harness that blocks the CodeGraph CLI in both arms. Its summary claims 88% fewer tool calls, 62% fewer processed tokens, and 44% lower average cost. These are workload-specific vendor results, not an independently reproduced forecast for daily coding.[1]

The project's separate multi-turn study reports approximately 80% more retrieval context remaining in the window with CodeGraph. It distinguishes total token throughput from resident context and estimates each tool's contribution using recorded model usage and response characters. The reported result explains how fast retrieval can still consume substantial space in later turns.[3]


Privacy and Operational Boundaries

The telemetry policy describes default-on collection with an installer prompt, a persistent random machine identifier, coarse indexing statistics, and daily tool-use totals. It excludes source code, paths, symbol names, and search queries. codegraph telemetry off disables collection; DO_NOT_TRACK=1 also disables the separate update check. These are documented controls, not a network audit performed for this profile.[4]

A September 14 report raises an unresolved discrepancy: its author says code inspection shows that switching telemetry off preserves the identifier and may leave existing processes using cached consent. The reporter explicitly did not capture the outgoing request. The issue was open when checked September 15, so privacy-sensitive deployments should verify the installed version's behavior rather than rely on the earlier blanket “nothing leaves” claim.[9]

The local index also supplies source to the connected agent. A local indexer cannot establish what that agent or its model provider does with those results.


Strengths

  • Embedded deployment: the graph does not require a separate database service or embedding API.[1]
  • Practical maintenance improvements: v1.6.0 addresses long-running index correctness, repeated responses, and integration setup.[2]
  • More useful measurement: the context-occupancy report exposes a tradeoff that a token-savings headline conceals.[3]

Cautions

  • Source volume matters: graph retrieval can reduce exploration while leaving more context for subsequent turns to carry.[3]
  • Correctness still needs checks: release notes list language-resolution and index-drift fixes; neither a broad language list nor automatic sync proves a complete call graph.[2]
  • Privacy claims need configuration: telemetry is documented, and the open opt-out report warrants targeted verification.[4][9]

What Developers Say

GitHub user LeDuyViet reported on August 3, 2026 that v1.5.0 in Cursor consumed about 60.2K context tokens versus 40.5K for grep/read on a roughly 2,300-file Go repository. Both sessions reportedly reached the correct answer. This is a first-hand, single-workload report; it is not a market-wide finding. The issue is closed, later release notes add deduplication, and the project now documents residual context explicitly.[10][2][3]

This is stronger evaluation material than treating stars or promotional reviews as evidence of consistent savings.


Pricing & Licensing

The local tool is available under MIT, allowing commercial use subject to the license's notice conditions. Compute, index storage, and the connected agent's model usage remain the operator's costs.[5]

The README still advertises a forthcoming CodeGraph platform and waitlist. This review found no public hosted price or availability commitment there; it should not be treated as an already purchasable production service.[1]


Choosing an Approach

Compared with repository packing: Repomix produces a selected repository snapshot in an AI-friendly format, with filtering, token counting, and optional structural compression. That is useful when the desired artifact is a shareable context bundle. CodeGraph instead maintains an index that the agent queries repeatedly. Choose according to whether the task needs a snapshot or ongoing relationship retrieval, and measure the resulting context size. [11][8]

Compared with another local graph engine: GitNexus exposes a larger named MCP tool surface, including targeted impact, trace, and rename operations, and uses embedded LadybugDB. Its public PolyForm Noncommercial license also differs materially from CodeGraph's MIT terms. This makes interface style, deployment, and permitted use concrete selection criteria; it does not establish which engine resolves your code more accurately. [12][5]

Compared with existing editor navigation: adding another index needs to earn its maintenance and context cost. Evaluate recurring questions about a framework or repository where built-in search is insufficient, then check the graph's answer against representative source and tests. Prefer a measured gain in correctness or investigation time over a universal claim that one retrieval method replaces the others.


Bottom Line

Recommended for: teams evaluating structural retrieval on recurring repository questions, with both answer quality and whole-session cost measured.

Poor fit: deployments that assume local software never makes network requests, or buyers expecting universal token savings without testing their query patterns.

Outlook: the more persuasive progress is improved indexing and candid measurement of context tradeoffs. Adoption statistics alone would not settle whether those improvements help a particular team.


Research by Ry Walker • methodology