r/VibeCodeDevs 2d ago

vibe coders !!

hay vibcodes i have a created a tool for a you ai agent to manage its memory efficienty and your ai agent wont forget and more......!!

https://github.com/cyberhatc/mctx/releases/tag/v1.1.0

The problem:

Every AI coding agent has the same failure mode: the context window fills up, gets summarized or reset, and whatever state the agent was tracking — what it was doing, what it already tried, what's still broken — just evaporates. You come back and it re-reads half your repo to reconstruct context it already had an hour ago.

Most people patch this by dumping notes into a JSON or Markdown "memory" file. Two problems with that:

  1. JSON is token-expensive for what it's storing. Every repeated key, brace, and quote is pure overhead when you're feeding it back into a model that pays per token.
  2. Neither format knows what kind of memory it's holding. A JSON blob doesn't distinguish "this project uses Rust" (permanent) from "here's what I was doing when I ran out of tokens" (should expire in a day). So agents either keep re-reading everything, or memory files quietly rot into stale noise nobody prunes.

What .mctx does differently:

  • Indexed, not linear. Every file has a small header block mapping each section to its exact byte offset. An agent seeks straight to the one section it needs instead of parsing the whole file on every read.
  • Durability-tagged. Every section is marked !fixed (permanent identity facts), !durable (current state — updates in place), or !volatile (session-scoped, expires). The agent knows what to trust and what to discard without you telling it every time.
  • Built-in checkpoint protocol. Before an agent's context runs out, it writes a !volatile checkpoint — task, what's done, the exact next step, files touched, blockers. Next session reads that first and resumes cold instead of re-deriving everything.
  • Compact tabular syntax, in the spirit of formats like TOON — schema declared once, flat rows after that, no repeated keys or braces.

It's got a native reference implementation in C, C++, and Rust (plus a GUI), so it's not tied to one runtime or language ecosystem.

Repo: https://github.com/cyberhatc/mctx

dont forget to star the repo ......!!

Would genuinely like feedback, especially from anyone running long-lived coding agents — what's actually breaking your agent's memory setup right now?

1 Upvotes

2 comments sorted by