Open-Sourcing mex v0.7.0: A Local Code Graph to Cut Coding Agent Token Usage by 90%

DJIRNMAN · reddit · 2026-08-02

A developer released v0.7.0 of the open-source tool mex, designed to solve the common coding agent pain point of rereading the entire repository every session, leading to massive context waste.

Core Features

mex creates a living Markdown wiki inside the repo to record architecture and decisions. The new version introduces a deterministic local code graph built with Tree-sitter and SQLite. Agents can query specific logic flows, and mex returns a compact context of relevant functions, callers, and dependencies instead of dumping entire files.

Performance

In benchmarks against traditional grep, mex reduced the returned context size by roughly 90.7% (10.74× less content) while maintaining 100% expected-symbol recall across six tasks. During five real-agent tasks, it never needed to fall back to standard Read/Grep commands.

Mechanism

The tool treats code as the source of truth, Markdown as the explanation, and the graph as the connection between them. If code changes, mex identifies which wiki documentation might be stale. It currently supports TypeScript, Python, and Rust.

Original post →

More from coding & agent

coding & agent channel →