Bing Wen

0%

Developer tooling · 2026

Context Mesh

Private

Code intelligence that cuts AI agent token spend by 99%.

Role
Design and engineering, solo
Timeline
4.5 months of active development

The problem

Ask an AI coding agent what calls a given function. Without an index it greps, gets partial matches, opens four files to confirm, spends several thousand tokens, and still misses the caller that reaches the function indirectly.

That loop repeats on every question. On a large repository it becomes the dominant cost of working with an agent — and it degrades precisely when the codebase is big enough that the help would have mattered most.

What it does

Context Mesh indexes a repository once and then answers structural questions — where is this defined, what calls it, what depends on it — in a single lookup instead of a search loop.

The design decision that carries the project is that one index is exposed three ways: as static files any tool can read, including editor modes that cannot call tools at all; as a command-line binary that runs anywhere a shell does, including inside subagents that do not inherit their parent's tool registrations; and as an MCP server for hosts that support it. Keeping all three in parity from a single build is the part that is easy to get wrong.

The measurements

There is a benchmark in the repository, it runs in CI, and it is pinned to specific public commits so the results reproduce.

Retrieving the same answers against a grep-loop baseline: 2,695 tokens and 7 tool calls, versus 832,432 tokens and 425 tool calls. Across a broader eleven-task run over four open-source repositories, task success was 100% against the baseline's 63.6%.

Fewer tokens than baseline
99.7%Fewer tokens than baseline
Fewer tool calls
98.4%Fewer tool calls
Task success vs 63.6% baseline
100%Task success vs 63.6% baseline
Test cases
1,657Test cases

The benchmark also carries a disclaimer I wrote against my own results: the scripted judge does not model the attention penalty a real model pays when you dump a large context on it, so the success-rate gap is softer than the number suggests and the cost gap is the honest signal. I would rather publish that caveat than a headline I cannot defend under questioning.

How it is built

tree-sitter does the parsing, which is what lets the call graph work across languages rather than just the one the tool happens to be written in. Route extraction covers roughly 22 web frameworks. The call graph crosses language boundaries — a React Native bridge call resolves through to its Swift or Kotlin implementation.

Incremental rebuilds are verified byte-identical to a full rebuild by the performance harness, and run between 1.6× and 30× faster depending on how much changed. An optional SQLite full-text index engages automatically once a repository is large enough to need it.

1,657 test cases. CI runs build, typecheck, the test suite and a benchmark regression gate on every push, so a change that quietly makes retrieval worse fails before it merges.

Status

Private. It is packaged for release and has not been released — the repository is not public and nothing is published to a package registry. It is in daily use across my own projects, including the site you are reading this on.

Stack

  • TypeScript, Node 20+, ESM monorepo
  • tree-sitter (WASM) for multi-language parsing
  • Model Context Protocol server — 27 tools
  • Optional SQLite FTS5 search accelerator
  • Vitest, CI with a benchmark regression gate

Need something in this shape?

Tell me what you are trying to build and roughly when you need it. I reply to every enquiry within one business day, including the ones I am not the right fit for.