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.
More from coding & agent
- DeepMind turns coding agent Antigravity into a science tool, surfacing novel antimicrobial peptide in one session — pushmeet · 2026-10-16
- Cross-review coding workflow: Claude writes the plan, Codex audits it — theteknosaur · 2026-10-16
- Simon Willison: code mode is the future of tool calling, if it can be sandboxed — springrod · 2026-10-16
- Normalizing Claude's schema-free MCP output before it hits downstream n8n nodes — snowingbol · 2026-10-16
- Agent named 'Ilya' reportedly scores 1.1pt higher on benchmarks — daniel_mac8 · 2026-10-16
- A plain notes.md fixed my agent's cross-session amnesia better than chat history — rahul_watertech · 2026-10-16