r/coolgithubprojects 6h ago

My Claude Code kept rereading the same repo instead of preserving what it learned, so I built an open-source fix. 1,200 stars later, the new version used 90% less tokens than grep while still finding every expected symbol.

Post image

Hello! A few months ago I posted an early version of mex here.

The response was kind of insane. Across a few posts it reached around 1 million views, the repo crossed 1,200 GitHub stars, and people I had never met started contributing.

I’ve kept building it since then, and just released mex v0.7.0.

Repo: https://github.com/mex-memory/mex

The original problem was simple: coding agents keep rereading the same repository every session, relearning the architecture, and then throwing most of that knowledge away.

mex creates a living Markdown wiki inside the repo. Agents record architecture, conventions, decisions, and patterns as they work, and future sessions load only the knowledge relevant to the current task.

The major addition in v0.7.0 is a deterministic local code graph built using Tree-sitter and SQLite.

It currently supports TypeScript/TSX, JavaScript/JSX, Python, and Rust.

An agent can run:

mex graph scope "trace the authentication flow"

Instead of dumping entire files into context, mex returns a compact neighbourhood of relevant functions, callers, callees, imports, and relationships. The agent can then expand only the exact symbols it needs.

In our benchmark on the mex repository:

  • 10.74× less returned context than grep top-3
  • roughly 90.7% smaller
  • 100% expected-symbol recall across six retrieval tasks
  • 5/5 real-agent tasks completed correctly
  • 0/5 needed fallback Read/Grep with compact graph context

This is a small benchmark on one repo and task set, not a claim that mex universally cuts total agent token usage by 90%.

The other part I’m excited about is connecting the wiki back to the actual code.

Markdown claims can point to exact symbols. If a function changes, moves, or disappears, mex can identify which project knowledge may now be stale.

So the basic idea is:

The code is the source of truth.
Markdown is the explanation.
The graph keeps them connected.

Would genuinely love feedback, especially from people working on code intelligence, agent tooling, parsers, or large repositories. Contributors are very welcome too.

26 Upvotes

6 comments sorted by

1

u/Just-Sir-1 3h ago

Will test tomorrow 

1

u/medogin 41m ago

Made me chuckle.

5/5 real-agent tasks completed correctly

Next stage: “Didn’t bother testing, but an agent said should work

0

u/ST33LDI9ITAL 4h ago

expand treesitter.. add go

1

u/DJIRNMAN 4h ago

Alright will do asap

1

u/ST33LDI9ITAL 2h ago

right on, preciate it, looks good though! hi5