Show HN: Mnemolith – AI coding memory that goes stale when your code changes (github.com)

1 points by Anish2910 ↗ HN
Hi HN, I'm Anish. I built Mnemolith because the AI coding tools I use (Claude Code, Cursor, Codex) either forget my project between sessions, or remember things that quietly stopped being true. Tell the agent "we use Postgres", migrate to MySQL two weeks later, and it keeps building on the old fact.

How it works:

- It's an MCP server, so Claude Code, Cursor and Codex share one memory per project (keyed by the git repo). - When the agent saves a memory, it can link it to the files it depends on. Mnemolith stores each file's git blob hash. If the file's contents change (committed or not), the memory is set aside and flagged for review, so the agent stops relying on it. - A local dashboard shows what the agent remembers, where each memory came from (tool, session, file versions), and its full history. You can confirm a memory is still true, or retire it and say what's true now. - Contradictions are judged by the agent, not by a similarity threshold. In my calibration, "we use Postgres" vs "we migrated to MySQL" only scored 0.30 similarity, so a threshold can't tell a contradiction from an unrelated fact. - Current memories can sync into a managed section of AGENTS.md / CLAUDE.md, so they get reviewed in PRs.

Under the hood it runs on an engine I wrote from scratch in Java: a Redis-compatible server with a built-in memory model and an HNSW vector index. Embeddings run locally (all-MiniLM-L6-v2). Everything stays on your machine.

It's early (v0.2.1). There's no team sync yet beyond the AGENTS.md/CLAUDE.md files, and it needs Java 11+ (it downloads a private copy if you don't have one).

I'd really like feedback, especially from people running coding agents on real codebases. What does your agent keep getting wrong?

3 comments

[ 3.2 ms ] story [ 14.4 ms ] thread
One day while I was sitting working on a personal project I was building using Claude Code I decided to give it a prompt about how I want it to build a function for me that would be directly connected to my database, well did I know that I would be shocked with what actually happened. When I started working on this project of mine, I had decided that I would want to use PostgreSQL purely because I felt that it is the one to use as I did not know a lot about the different databases. Soon after I decided that after doing some research it makes a lot of sense to use MySQL for this project and I discussed this with ChatGPT and I changed my database completely and was working with a MySQL database. To my surprise, the AI models did not realize that, once I got back on Claude and was trying to design a future function something looked not so right to me and there it was - functions were written in a way that I was still using PostgreSQL and they were not at all written in a way for MySQL so it was not possible for them to work and Claude was writing them with so much confidence as in its memory it remembered it as a PostgreSQL.

I was shocked and bamboozled by this honestly so I decided to test it on Cursor and see if it is a thing where the AI model’s memory does not get updated the way it should. That was the moment I decided that I should make Mnemolith, for as insane the name sounds it actually means memory stone and for some reason I thought of carvings on stones as a memory and in this scenario we can change these carvings and basically keep our memory updating. I started building Mnemolith and now I can proudly say that it works on your own local computer (hopefully no bugs but if you find any bugs or anything that I should improve on, please let me know) and is connected to your AI agents like Cursor, Claude Code and Codex. Now memories that are linked to your project files get flagged as soon as those files change, and the user will also find out what happened and they can decide if they want to rewrite what was saved or if it was something that can be ignored. Setup tells the AI models to call Mnemolith, and we let them know which memories changed or were replaced and why, so that they don’t build on old facts and we save time. In our system, each memory stores a hash of the files it depends on so even before a commit we are able to find what changes and the best part is that this all started as a codecrafter’s challenge on building your own redis using java. I would love to know what your AI keeps getting wrong about your projects and any feedback regarding this and things I should work on in the future.