All notable changes to CodeGraph are documented here. Each entry also ships as
a GitHub Release tagged
vX.Y.Z, which is where most people will look.
This project follows Keep a Changelog and adheres to Semantic Versioning.
.codegraph/ index folder no longer clutters git status: its generated ignore file now excludes everything in the folder except itself, so the database, daemon.pid, sockets, and logs stop showing up as untracked changes. (#492, #484).xsjs / .xsjslib files are now indexed as JavaScript. (#556).mts and .cts module files are now indexed instead of being skipped. (#366)func (s *Stack[T]) Push(...)) are now correctly attached to their type, so callers, callees, and impact include them. (#583)resources/list and prompts/list probes with an empty list instead of an error, clearing the -32601 messages some clients (opencode, Codex) logged on connect. (#621)codegraph_explore is now the primary tool, and one call is usually all an agent needs: it returns the verbatim source of the symbols relevant to your question (a plain question works as the query — you no longer need exact symbol names), grouped by file and Read-equivalent, so the agent answers without falling back to read/grep. The narrower codegraph_context and codegraph_trace tools were removed in favor of it — explore already surfaces the call flow among the symbols you name (the job trace did), so there's one obvious tool to reach for instead of three.codegraph_explore now includes a compact "Blast radius" for the symbols you're looking at — who depends on each (just the locations, not their source) and which test files cover it — so before editing, the agent can see what else to update and which tests to run, without a separate impact lookup. Symbols nothing depends on are skipped, so it stays short.create((set, get) => ({ … })) store, and the same shape in Redux, Pinia, MobX, or any exported handler/route map — are now indexed as real symbols. Previously they existed only as object properties, so looking one up by name or asking who calls it returned "not found" and the agent had to read the whole store file to follow the flow; now codegraph_node, codegraph_callers, and codegraph_explore resolve them directly — including calls made through useStore.getState().fetchUser() or a destructured const { fetchUser } = useStore.getState().codegraph_explore now surfaces the right definition when a method name is overloaded across types. Asking about, say, DataRequest's task and validate used to return a same-named method from an unrelated file (or an abstract base stub) and bury the one you meant; explore now recognizes the type you named in the query and leads with that type's own overloads, in full.codegraph_explore's results).codegraph_node now returns every definition when a name is ambiguous — an overloaded method, or the same method name on different types — instead of returning one (sometimes the wrong one) with a note listing the rest. Asking for such a symbol now hands back all of the matching definitions with their source in a single call, so the agent stops having to read the file by hand to find the specific overload it wanted (common in Swift, Go, Java, and C#). For a heavily-overloaded name (a poll/validate with dozens of definitions), pass file (and/or line) — e.g. the file:line shown in a trail — to get that exact definition's body. Large overload sets show the most relevant ones in full and list the remainder by location.codegraph_explore never returns half a method anymore: when output runs up against its size budget it drops whole methods or whole files (and lists what it dropped, so you can ask for them in another call) instead of cutting off a method body partway. A truncated method was the one case that still sent the agent to read the file for the rest — so the source explore returns is now always complete and usable as-is.codegraph init now builds the initial index by default — you no longer need the -i/--index flag (it's still accepted, so existing commands and scripts keep working). (#483)codegraph_trace and codegraph_explore — following a request reaches the middleware and route handlers registered via .Use() / .GET() instead of dead-ending where the framework dispatches the chain dynamically.codegraph_explore now sizes its response to the answer instead of the file count: it shows the mechanism and the exact methods you asked about in full — even when they're buried deep in a large file — while collapsing the redundant interchangeable implementations of an interface (an HTTP interceptor chain, a query-compiler family) down to signatures. Fewer tokens for a more complete answer, so on the flows that used to occasionally cost more than plain grep/read it's now clearly cheaper — and the win holds across small, medium, and large codebases. Distinct, non-interchangeable code is shown in full as before. Disable with CODEGRAPH_ADAPTIVE_EXPLORE=0.codegraph_trace and codegraph_explore — following a request's lifecycle reaches the validators registered with .validate { … } instead of dead-ending where the framework runs them by iterating a stored list of closures. Any pattern where closures are appended to a collection and later invoked by looping over it is now traced.codegraph_explore now spells out the dynamic-dispatch relationships of the symbols you ask about — e.g. "the closures registered here are run by didCompleteTask" — so the indirect hops you'd otherwise grep to reconstruct are listed alongside the call flow.codegraph_explore answers multi-phase questions that span a large "god file" far more completely. For a flow like "build, send, and validate a request" — where one big file holds the build chain and the validate logic lives in others — it now keeps every method on the flow path in full, collapses the file's off-path methods to one-line signatures, and guarantees each phase's defining file is shown (instead of truncating at a fixed size and dropping whichever phase came last, which sent you to read it by hand). Incidental files that merely name-drop the flow are still trimmed, so the response stays focused on the code that answers the question.require("@colbymchenry/codegraph") and import now resolve the programmatic API — the CodeGraph class plus building blocks like DatabaseConnection, QueryBuilder, initGrammars, and FileLock — so you can drive the graph directly from your own app (for example an Electron process) instead of only through the CLI or MCP server. Embedding runs on your own runtime, so it needs Node 22.5+ for the built-in SQLite. (#354)codegraph_trace now resolves an overloaded symbol name to its real implementation instead of an empty protocol/delegate stub. Tracing a flow through a heavily-overloaded API (common in Swift, Java, C#, and Go) could land on an unrelated no-op method that happened to share the name and report "no path"; it now picks the substantive definition the flow actually runs through..properties) no longer misleadingly reports "No files found to index" — these files are tracked at the file level and are now counted as indexed. Thanks @luojiyin1987 (#357).codegraph_trace can't find a static path (a dynamic-dispatch break), it now inlines both endpoints' source, callers, and callees in one response, so the agent gets the full picture without a flurry of follow-up calls.codegraph_explore (Go, Ruby, JS/TS, Java/Kotlin/Scala), so the explore budget goes to your real implementation source.codegraph_context now auto-traces flow questions like "how does X reach Y" or "trace the path from A to B", splicing the trace into the response so you don't need a separate codegraph_trace call.codegraph_context now inlines a URL-to-handler routing table and the source of your main routes file for routing questions on small projects, so you don't have to go read routes.rb or web.php yourself.codegraph_context search now boosts results in the directory of a project's core framework file, so a small same-named extension file no longer outranks the actual framework core.new T() { ... }) and their overridden methods are now indexed as real class nodes, so an agent sees those hidden overrides in its trail without a Read.## CodeGraph instructions block into your agent's instructions file (CLAUDE.md, AGENTS.md, GEMINI.md, Cursor's .cursor/rules/codegraph.mdc, or Kiro's steering doc) — the MCP server is now the single source of truth, and re-running codegraph install or codegraph uninstall strips a block a previous version left behind (#529). If you added your own notes inside the CODEGRAPH_START/CODEGRAPH_END markers, move them outside the markers first, since the whole marked block is removed.codegraph index and init -i now report the true edge count in their summary, instead of undercounting by missing resolution and synthesizer edges.@Value and @ConfigurationProperties references resolve to the matching keys in your application.yml/.properties config (including relaxed kebab/camel/snake binding), and field-injected concrete beans like this.field.method() resolve through to their implementation (#389).codegraph install, detected and configured out of the box with sibling settings and MCP servers preserved across re-installs (#399).codegraph install on macOS, Linux, and Windows, with its own steering file so it loads CodeGraph guidance naturally (#385).#include "header.h" directives now connect to the real header file instead of a phantom import, so includes show up as true file-to-file edges; system and stdlib headers are filtered out so they don't false-resolve (#453).type aliases with object shapes (including function-typed members and intersection types) now surface their members in the graph, so a call like handle.stop() resolves to the alias member instead of an unrelated look-alike class in a sibling directory (#359).pkg.Func() now resolve to the right package by reading your go.mod, so callers, callees, impact, and trace return complete results on Go monorepos instead of almost nothing (#388).codegraph_files now returns the whole project when an agent passes a root-ish path like /, ., ./, "", or a Windows-style \, and subdirectory filters like /src, ./src, and src\components all resolve correctly instead of returning "No files found" (#426).const token = getToken()) and inside inline object-literal methods are no longer dropped, so they show up in callers as expected, including in Vue single-file components (#425).FOREIGN KEY constraint failed error in a long-running daemon; a stale lookup now drops a single edge instead of failing the whole sync (#455).codegraph install --target hermes no longer corrupts ~/.hermes/config.yaml, correctly handling PyYAML's block-style lists and re-installing cleanly even on an already-corrupted file (#456).RouterModule.register([...]) (including nested children) now propagate to controller routes, so a route shows up at its full path like GET /admin/users instead of GET / (#459).m_alg->Processing(), including out-of-line method definitions and the common case of two classes sharing a method name (#445, #454).CODEGRAPH_DAEMON_IDLE_TIMEOUT_MS (default five minutes).CODEGRAPH_NO_DAEMON=1 to opt out and get one independent server per client, handy for debugging or sandboxes that disallow local sockets; the daemon is also version-pinned, so upgrading CodeGraph never mixes versions over the connection.CODEGRAPH_WATCH_DEBOUNCE_MS lets you tune the file-watcher quiet window (default 2000ms) for workspaces with bursty writes like format-on-save chains or large generated outputs, without touching your agent's command line (#403)..m, .mm, and content-sniffed .h files now parse with full structural extraction, including full multi-part selectors, properties, imports, and superclass/protocol relationships, so trace, callers, and callees work across iOS codebases (#165).codegraph init -i in the worktree (#155)..gitignore) before registering watches, so CodeGraph can run alongside your editor or dev server without hitting the per-user watch ceiling (#276).git pull, branch switches, and edits made outside your editor; change detection is filesystem-based instead of relying on git status, so pulled or checked-out code is picked up without a full re-index.node_modules, vendor, dist, build, target, .venv, __pycache__, Pods, and .next are now excluded by default, so context and search reflect your code instead of third-party noise even in a project with no .gitignore; add a .gitignore negation to index one anyway (#407).codegraph_trace, codegraph_callees, and codegraph_explore now follow flows that have no static call edge — callback and observer registration, EventEmitter, React re-renders and JSX children, Flutter setState to build, C++ virtual overrides, and Java/Kotlin interface-to-implementation dispatch (like Spring's @Autowired service calls) — and each bridged hop is labeled inline in trace with where it was wired up.codegraph_trace now returns a self-contained flow dossier: every hop shows its full body inline plus the destination's own outgoing calls, so a single trace usually answers a "how does X reach Y" question without a follow-up explore, node, or Read.codegraph_explore now leads with the execution flow when your query names the symbols of a flow, finding the call path among those symbols (including across dynamic-dispatch hops) so you get a trace-quality answer without switching tools.codegraph_node and codegraph_trace now emit line-numbered source (matching codegraph_explore and Read), so you can cite or edit exact lines without re-reading the file just to recover line numbers.CODEGRAPH_MCP_TOOLS environment variable lets you expose only a chosen subset of codegraph tools over MCP (e.g. trace,search,node,context) without editing your client's MCP config; unset exposes all of them.SHA256SUMS file, and the npm launcher verifies the bundle it downloads against it, aborting on a mismatch (releases published before this change skip verification rather than failing).index/get/update that were being silently dropped, and an explore output-budget issue that under-returned source on repos with very large files.codegraph serve --mcp no longer keeps running after its parent agent is force-killed (OOM, kill -9, or container teardown) on Linux, where it used to hold inotify watches, file descriptors, and the SQLite WAL indefinitely; the server now shuts down as soon as its parent process changes, tunable via CODEGRAPH_PPID_POLL_MS (#277).@colbymchenry/codegraph through a registry mirror that hadn't yet mirrored the matching per-platform package no longer fails with no prebuilt bundle for <platform>; the launcher now downloads the bundle from GitHub Releases and caches it, with CODEGRAPH_NO_DOWNLOAD=1 to disable the fallback and CODEGRAPH_DOWNLOAD_BASE to point it at your own mirror (#303).install.sh no longer fails with 403 / "could not resolve latest version" on shared or cloud hosts that exhaust GitHub's unauthenticated API rate limit; it now resolves the version through the unthrottled releases redirect, and CODEGRAPH_VERSION accepts a bare version like 0.9.4 as well as v0.9.4 (#325).codegraph uninstall command cleanly removes CodeGraph from every agent it's configured on — Claude Code, Cursor, Codex CLI, opencode, and Hermes Agent — in one step, asking whether to clean up your global or this project's local config and reporting exactly which agents it touched; it accepts --location, --target, and --yes for scripted or non-interactive use, removes only what codegraph install wrote, and leaves your .codegraph/ index alone (#313).Fatal process out of memory: Zone crash on Node.js 22 and 24, even with plenty of RAM free — CodeGraph now launches with a V8 flag that keeps grammar compilation off the optimizing tier, and any launch path that doesn't get the flag directly re-execs once with it automatically (#298, #293). Node 25 stays blocked for now, since its variant of this bug isn't fixed by the same flag..cursor/rules/codegraph.mdc file outright instead of leaving an orphaned, empty rule behind, while keeping any content you added outside CodeGraph's markers..codegraph/config.json and the entire config surface are gone, and the library API for it (the config type, the config option on init(), and the get/update config exports) has been removed — existing config files are now ignored, and .gitignore is the single source of truth for what gets indexed. The .codegraphignore marker is also no longer supported; use .gitignore instead.codegraph install now supports Hermes Agent (Nous Research), wiring up the CodeGraph MCP server so Hermes can drive the knowledge graph like the other agents.*.routing.yml link to their controller, form, or entity-handler, and hook implementations across modules are connected to their canonical hook name, so asking for callers of a hook returns every implementation (#268)..gitignore everywhere — in git repos via git, and in non-git projects by reading .gitignore files directly — so to keep something out of the graph you just add it to .gitignore. Behavior change: committed files that aren't gitignored are now indexed even under vendor/, Pods/, or a committed dist/; add a .gitignore negation to exclude them (#283).codegraph command no longer fails — the launcher now invokes the bundled runtime directly instead of a .cmd file that modern Node refuses to spawn, so codegraph works regardless of your Node version (#289).codegraph_context call is now opened safely so it can't follow a symlink, closing a hole where another local user on a shared machine could redirect that write onto a file you can write (#280).curl … | sh and irm … | iex) no longer fail to launch on a machine that has no Node installed.npm i -g on Linux x64 now finds its bundle, after the 0.9.0 release silently shipped without the linux-x64 package; the release pipeline now verifies every package reached the npm registry so a release can't pass green-but-broken again.CodeGraph now ships its own self-contained runtime, so it installs on any Node version — or none at all — with no native build step, and the old intermittent "database is locked" errors are gone for good.
install.sh on macOS and Linux, and install.ps1 on Windows fetch the self-contained bundle and put codegraph on your PATH (you can still use npm/npx on any Node version too)..lua projects (Neovim plugins, Kong, OpenResty, game code), surfacing functions, table methods, local variables, require(...) imports, and the call edges between them..luau, Roblox's typed superset of Lua, adding type and export type aliases, typed function signatures, generics, and Roblox instance-path requires on top of everything Lua extracts (#232).codegraph status now reports the effective journal mode, so a "database is locked" report is easy to triage at a glance.codegraph install now strips the broken auto-sync hooks that pre-0.8 versions wrote into Claude Code's settings, which had been causing a "Stop hook error: unknown command 'sync-if-dirty'" on every turn. The cleanup is surgical and leaves unrelated hooks untouched. Re-run codegraph install once on an affected machine to clear the error.@nestjs/* dependency (#220).codegraph_explore source now includes line numbers, so an agent can cite file:line straight from the result instead of reopening the file to find a line number; set CODEGRAPH_EXPLORE_LINENUMS=0 to disable./mnt/* drives, where the live file watcher is too slow and could break MCP startup, CodeGraph now skips the watcher and offers to keep the index fresh with git hooks instead; new CODEGRAPH_NO_WATCH=1 (or serve --mcp --no-watch) forces the watcher off anywhere, and CODEGRAPH_FORCE_WATCH=1 overrides the WSL auto-detect when your setup is actually fast.file:line-cited answers on medium and large repos.codegraph_node with code on a class, interface, struct, or enum now returns a compact member outline (fields plus method signatures with line numbers) instead of the entire class body; functions and methods still return their full source.codegraph_explore output now scales with project size, so small projects get tighter responses than your native grep-and-read flow would produce while large codebases keep their fuller budget, and a per-file cap stops a single dense file from collapsing into a whole-file dump (#185). Thanks @essopsp.FooTest.kt, BarTests.swift, BazSpec.scala, QuxTestCase.cs) and test source-set directories in Kotlin, Swift, Scala, and C#, so real implementations no longer get outranked by tests.codegraph_explore output is now hard-capped to its size budget, so an oversized response no longer overruns the cap and sits in the agent's context to be re-read every turn.codegraph sync; CodeGraph now hash-compares them against the index the same way it does tracked files (#206). Thanks @15290391025.codegraph init -i now finds source inside nested, independent git repositories that aren't submodules (common in CMake super-repo layouts), instead of reporting "No files found to index" (#193). Thanks @timxx.codegraph status should report it (#203). Thanks @Finndersen.roots/list request before falling back, and the error message is actionable when a project still can't be resolved (#196). Thanks @zhangyu1197./mnt/* mount, so the codegraph tools actually appear; CodeGraph auto-skips the watcher there with manual and git-hook sync fallbacks (#199). Thanks @mengfanbo123..mcp.json (the file Claude Code actually reads for project-scoped servers) instead of a file it ignores, and re-running codegraph install migrates an affected project automatically (#207). Thanks @Jhsmit.codegraph_explore and codegraph_context output are now language-neutral instead of C-style comments, so they no longer look wrong inside Python, Ruby, and other non-C source blocks.codegraph index and codegraph sync no longer turns into garbled characters; CodeGraph now uses plain ASCII glyphs by default on Windows, with CODEGRAPH_UNICODE=1 to opt back into the Unicode glyphs or CODEGRAPH_ASCII=1 to force ASCII on any platform (#168). Thanks @starkleek and @Bortlesboat.module::symbol (Rust, C++, Ruby), Module.symbol (TypeScript, JavaScript, Python), or module/symbol, including multi-level paths and Rust prefixes like crate, super, and self (#173). Thanks @joselhurtado.AGENTS.md file with CodeGraph usage guidance, so opencode reaches for the codegraph_* tools instead of falling back to its native search.opencode.jsonc now survive install, re-install, and uninstall, because the installer makes surgical edits instead of rewriting the whole file.codegraph install now wires up the MCP server in the file opencode actually reads — previously it wrote to a config file opencode ignores by default, so the CodeGraph entry never appeared in any opencode session; re-run codegraph install --target=opencode after upgrading so the entry lands in the right place.codegraph install now sets up Claude Code, Cursor, Codex CLI, and opencode from one multi-select prompt, with any agents it detects pre-checked, so a single install wires up every editor you use (#137).--target, --location, --yes, --no-permissions, and --print-config.codegraph init now auto-wires project-local agent config for any agent you installed globally, so one global codegraph install works in every project you open without re-installing per project.Thanks @andreinknv for the substantive draft this release was based on.
codegraph command failing with permission denied right after a fresh global install — the 0.7.5 package shipped the CLI without its executable bit, so your shell refused to run it. New installs work out of the box. If you're stuck on 0.7.5, upgrade to 0.7.6 or unblock yourself in place by making the installed binary executable with chmod +x.