Frequently Asked Questions

Answers about what CodeMesh is, how it reduces token consumption, what its published benchmark measured, and how it handles your source code.

About CodeMesh

CodeMesh is a context optimization layer for AI coding agents. It helps agents understand a codebase without repeatedly searching, opening and reading large amounts of source code, allowing them to work with more precise repository context and dramatically fewer unnecessary tokens.
CodeMesh parses a connected repository with Tree-sitter and maintains a structural understanding of it (files, functions, classes, imports, calls and dependencies) as a graph. When a coding agent needs context, it queries that graph directly instead of searching, opening and re-reading files, and only the relevant result crosses back into the agent's context.
No. CodeMesh doesn't write code, run commands or make changes to a repository. It's a context layer that supported coding agents query for repository information; the agent still does the actual coding.
No model sits in CodeMesh's retrieval path. Parsing a repository and answering structural queries against its graph are deterministic operations, not LLM calls.
It's broader than search. A search engine finds text that matches a query; CodeMesh resolves explicit structural relationships (which functions call which, what imports what, what depends on what) so an agent can navigate a codebase by relationship, not only by keyword or text similarity.
No. CodeMesh doesn't retrieve code by embedding similarity. It retrieves code through a structural graph of explicit relationships between repository entities.
CodeMesh uses a knowledge graph internally to represent a repository's entities and relationships, but that graph is an implementation detail, not the product. CodeMesh is the context-optimization layer built on top of it: what a coding agent actually talks to, not a graph database product in its own right.
No. CodeMesh works alongside Cursor as the context layer underneath it: you keep using Cursor to write and edit code.
No. CodeMesh works alongside Claude Code the same way: as a context source it can query over MCP, not a replacement for it.

Token usage

Before a coding agent can answer a question or make a change, it typically has to search a repository, open candidate files, read code, follow imports, find callers and re-read related code, and every one of those discovery steps costs tokens before the model produces any useful output. On a large or unfamiliar repository, that discovery can end up consuming more tokens than the actual reasoning and code generation that follows it.
Instead of having an agent rediscover a repository's structure from scratch on every question, CodeMesh parses it once and answers an agent's structural questions directly from that understanding, cutting the repeated searching, opening and reading that drives up token consumption.
The context and retrieval portion of a coding session: the tokens spent searching, opening and reading code before the model starts reasoning. It doesn't touch model pricing, subscription fees, or the reasoning and generation tokens a task genuinely requires.
No, not directly. CodeMesh's mechanism targets the discovery and retrieval tokens an agent spends finding and reading code, not the tokens it generates while reasoning or writing a response. Output-token volume is mostly a function of the task and the model, not something CodeMesh's retrieval layer changes.
No. Context windows are a property of the model, not something CodeMesh changes. CodeMesh reduces how much of that window gets consumed by unnecessary repository discovery, so more of it stays available for actual reasoning.
No. The 95.1% result comes from CodeMesh's published benchmark and is not a guarantee that every customer's total AI bill will fall by the same percentage. Actual savings depend on repository, task, model, coding agent and usage behavior.

Benchmark

98 software-engineering questions, spanning four difficulty tiers.
openclaw, a public open-source codebase.
The same model for both arms of the test, driving the same CLI (Claude Code) against the same repository checkout. The only difference between arms was which tools the agent was allowed to use to find things.
Every token the run actually consumed: input, output, cache-read, cache-creation, and helper-model tokens, measured from the run artifacts, not estimated from file sizes.
Real, measured API spend for the run itself, not a rate-card projection.
No. All 98 questions are shown, including the 11 CodeMesh answered incorrectly.
In principle, yes: openclaw is a public repository, so the same 98 questions can be re-run against it. CodeMesh hasn't published a packaged, one-click reproduction script; reproducing the exact run requires the same repository checkout and question set described in the methodology.

Integrations

Yes. CodeMesh connects to Claude Code, Cursor, Devin and VS Code through one CodeMesh extension and MCP connection: a repository only needs to be connected once, regardless of which of these you use.
Yes. MCP (Model Context Protocol) is the mechanism supported coding agents use to query CodeMesh once a repository is connected.

Repository support

75 languages, each with its own Tree-sitter grammar and extraction query: Ada, Agda, Apex, Astro, Bash, C, C#, C++, Clojure, CMake, Common Lisp, Crystal, CSS, D, Dart, Dockerfile, Elixir, Elm, Erlang, F#, Fortran, GDScript, Gleam, GLSL, Go, GraphQL, Groovy, Haskell, HCL/Terraform, HTML, Java, JavaScript, jq, Julia, Kotlin, Lua, Luau, Make, MATLAB, Nim, Nix, Objective-C, OCaml, Odin, Pascal, Perl, PHP, PowerShell, Prisma, Prolog, Protobuf, Python, QML, R, Racket, Ruby, Rust, Scala, Scheme, Shell, Slint, Solidity, SQL, Starlark, Svelte, Swift, SystemVerilog, templ, TLA+, TOML, TypeScript (and TSX), VHDL, Verilog, Vue, XML and Zig. Markdown, JSON and YAML are indexed as searchable text rather than parsed into a syntax tree.

Security

CodeMesh stores your repository's parsed structure and source text in a graph scoped to your organization. Your machine and your coding agent never hold a database credential: every query is scoped by the credential itself, executed read-only, and only the result crosses back.
No. Tenancy is enforced from the credential presented on each query, never from anything the client sends, so one organization's credential cannot read another organization's data.

Still have questions?

See how CodeMesh's structural approach to context measured up in a published, reproducible benchmark.

Start Saving TokensSee the Benchmark