2026-11-27 16:21 UTC

Mnemolith adds file-version checks to shared local memory for coding agents

state: expiredheat: lowuncertainty: mediumrelevance: mediumcoding-agent-memory stale-memory mcpAnish Chugh

What is this?

Mnemolith is an early, open-source local memory system for AI coding tools, presented by its creator, Anish Chugh. Its GitHub documentation says it connects Claude Code, Cursor, and Codex through MCP, can associate memories with Git file-content hashes and flag them for review when those files change, and keeps provenance and history. It also offers a local dashboard and can sync current memories into AGENTS.md or CLAUDE.md. The project describes itself as v0.2.1 in the Show HN post; its documentation says it has not yet published an evaluation showing whether memory improves real coding-task outcomes. These are project claims, not independently verified results.

Why it matters

Mnemolith addresses a practical weakness in coding agents: persistent project notes can be shared across tools, but may become wrong as code evolves. Its file-hash checks, reviewable history, and local-only design are notable choices for managing stale context. It is an early project in a crowded agent-memory space, and there is no reported evaluation showing that it improves coding outcomes; the supplied evidence supports watching it, not treating its approach as proven.

Current assessment

Anish Chugh introduced Mnemolith in a Show HN post; the linked GitHub documentation describes an open-source, local MCP memory server for Claude Code, Cursor, and Codex. Memories can be linked to Git blob hashes of files; on recall, changed files cause dependent memories to be flagged as stale for review, including after uncommitted edits. The project also describes provenance and history, a dashboard, and syncing current memories into AGENTS.md or CLAUDE.md. Its stated design keeps embeddings and memory local. The post identifies v0.2.1 and says team sync beyond instruction files is not available. The repository documentation says there is not yet an evaluation comparing coding tasks with and without memory. Its benchmark figures concern the custom Redis-compatible engine and vector search, not agent coding quality; these are project-reported results. Broader web results point to other shared-memory tools, so cross-tool persistence itself is not unique; Mnemolith's code-change-aware staleness handling is the distinctive claim here. Practical questions to revisit include reliability of stale detection, user burden in resolving flagged memories, security and maintenance of the local engine, and whether real-world evaluations show fewer repeated explanations or coding errors.

Measured heat

no measured readings yet β€” the hourly heat pass fills this in

How the heat travelled

10-22 19:32 (minted)⭐ origin echo-reconstructedThe HN post is Anish’s own launch description and links directly to his project repository; the repository is the original project artifact,
Anish Chugh (@anishchugh05) on github (echo) Β· attributed from hn.story.50199581 Β· published time unknown
β€”
10-22 18:59first on hacker news Β· published Β· lag ?Show HN: Mnemolith – AI coding memory that goes stale when your code changes
Anish2910
β€”
10-22 18:59amplified on hacker news πŸ‘‘hn.story.50199581
Anish2910
peak 1 Β· 0 comments Β· 105% of case engagement
10-22 19:26our radar first saw it Β· lag ?discovery anchor: hn.story.50199581β€”

Evidence (2) β€” ⭐ canonical anchor

sourceobjectauthorscorecomments
🟧 hnShow HN: Mnemolith – AI coding memory that goes stale when your code changes
Retrieved article excerpt

Open article Β· Retrieved 2026-10-22T19:28:20.294281+00:00

[Mnemolith: memory that stays true to your code](https://mnemolith.dev/)

# Mnemolith

**Shared memory for AI coding tools that stays true to your code.**

*Mnemolith (NEE-mo-lith): "memory stone." What your AI learns, carved where every tool can read it. ([Why the name](https://mnemolith.dev/about.html#name))*

> **Formerly Aether Cache.** If you installed `aether-cache`, see [Moving from Aether Cache](https://github.com/anishchugh05/mnemolith#moving-from-aether-cache): your memories come with you.

**[Website](https://mnemolith.dev/)** Β· **[PyPI](https://pypi.org/project/mnemolith/)**

Claude Code, Cursor, and other AI tools each forget your project between sessions, and when they do remember things,
nothing checks whether those memories are still correct. Mnemolith gives every tool one shared, local memory, and keeps
it honest:

- **Memories go stale when the code changes.** Each memory is linked to the files it's about, with a snapshot of their
  git content hash. When `docker-compose.yml` changes, the memory about it is retired automatically instead of being
  fed to your AI forever.
- **Contradictions get replaced, not hoarded.** "We migrated to MySQL" retires "we use Postgres" instead of sitting
  next to it and confusing the model. Near-identical repeats are merged.
- **Every memory can explain itself.** Which tool and session saved it, which file versions it was based on, and every
  change since: created, seen again, went stale, confirmed, replaced.
- **It works with the files you already use.** Current memories sync into a managed section of `AGENTS.md` and
  `CLAUDE.md`, so they're committed, reviewed in PRs, and visible to teammates who don't run Mnemolith.

It runs entirely on your machine, on top of a database engine I wrote from scratch.

## Not a Redis clone

Mnemolith started as a from-scratch rebuild of Redis in Java, then kept going. Every layer here is written from
scratch, and each one does something the layer beneath it can't:

| Layer | What it adds |
| --- | --- |
| **MCP server** | Claude Code, Cursor, and any MCP tool share one memory |
| **Git awareness** | Memories retire themselves when the code they describe changes |
| **Memory layer** | Status, provenance, full history, duplicate merging, and conflict review, inside the engine |
| **HNSW vector index** | Semantic search: 99.4% recall at 0.84 ms on 100K vectors, 22Γ— faster than exact search |
| **Redis-compatible engine** | RESP protocol, 50+ commands, replication, transactions, and crash-safe persistence (0 acknowledged writes lost across 1,039,890 writes and 8 `kill -9` crashes), at 88–93% of real Redis's throughput |

The bottom layer alone is a working Redis: `redis-cli`, `redis-benchmark`, and `redis-py` talk to it unchanged. The
memory layer, git awareness, and MCP server are things Redis doesn't do at all.

```
Claude Code ─┐                       β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
Cursor ──────┼─ MCP ─► mnemolith ─┼─ RESP ─► Java engine (Main.java)            β”‚
other tools β”€β”˜   (Python: embeddings,β”‚          memories, HNSW vector index,       β”‚
                  git hashing, sync) β”‚          history, append-only file on disk  β”‚
                                     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
```

## What it looks like

The dashboard (`mnemolith ui`): memories whose files changed wait for a decision, with the file versions side by side.

The Mnemolith dashboard showing stale memories and a possible conflict

And from your AI tool's side, a memory linked to a file, the file changes, and the next lookup catches it:

```
> remember("The database runs Postgres via docker compose", files=["docker-compose.yml"])
Saved as m1.

        ... someone edits docker-compose.yml ...

> recall("database setup")
These memories were just retired because files they depend on changed. If one is still true,
call confirm_memory; if it's wrong, save the corrected fact with remember:
[m1] "The database runs Postgres via docker compose" is now marked outdated: docker-compose.yml changed.

> confirm_memory("m1")        # still true, so re-link it to the new version of the file
Confirmed m1; it's active again and linked to the current file versions.

> explain_memory("m1")
m1: "The database runs Postgres via docker compose"
status: active, project: demo
saved by: claude-code (session eea54b5c)
linked files: docker-compose.yml@02ea346...
history:
  19:16  created: by claude-code (session eea54b5c), linked to docker-compose.yml@87da641...
  19:16  active -> stale: docker-compose.yml changed since this was saved
  19:16  re-linked: to docker-compose.yml@02ea346... (confirmed still true)
  19:16  stale -> active: confirmed still true
```

A newer fact replacing an older one:

```
> remember("The API timeout was raised to 60 seconds")
Saved as m3.
Related existing memories:
[m1] (similarity 0.58) The API timeout is 30 seconds
If m3 makes any of these no longer true, call replace_memory(old_id, "m3"). Otherwise do nothing.

> replace_memory("m1", "m3")
m1 retired; m3 replaces it.
```

## Quick start

One line installs everything and runs setup. On macOS or Linux:

```
curl -fsSL https://mnemolith.dev/install.sh | sh
```

On Windows (PowerShell):

```
powershell -ExecutionPolicy ByPass -c "irm https://mnemolith.dev/install.ps1 | iex"
```

The installer ([install.sh](https://github.com/anishchugh05/mnemolith/blob/main/docs/install.sh), [install.ps1](https://github.com/anishchugh05/mnemolith/blob/main/docs/install.ps1)) gets [uv](https://docs.astral.sh/uv/) if you
don't have it (uv brings Python), installs Mnemolith, and runs `mnemolith setup`. Prefer your own tools? Any of
these works, followed by `mnemolith setup`:

```
uv tool install mnemolith
pipx install mnemolith
pip install mnemolith        # Python 3.10+
```

`setup` starts the engine in the background, downloads the embedding model once (about 90 MB), and connects every
supported AI tool it finds on your machine: **Claude Code, Cursor, and Codex**. That's it. Open your AI tool in any git
repo and try:

> Remember that our tests need DOCKER\_HOST set. It depends on docker-compose.yml.

Then start a new session and ask how to run the tests.

The engine runs on Java 11+. If you have it, it's used. If you don't, Mnemolith downloads a private copy (about
50 MB) into `~/.mnemolith/java`, checks it against its published checksum, and uses it only for Mnemolith;
nothing is installed system-wide, and `mnemolith uninstall` removes it.

Already keep notes for your AI in `CLAUDE.md`, `AGENTS.md`, or Cursor rules? Run `mnemolith import` in the repo
(or use **Import notes** in the dashboard) to turn them into memories, linked to the files they mention.

Memories are kept per project (the git repo's folder name), so projects never mix. Everything stays on your machine:
the engine only accepts connections from it, and your memories live in `~/.mnemolith`.

| Command | What it does |
| --- | --- |
| `mnemolith setup` | One-time setup: engine, model, and AI tools |
| `mnemolith add` | Adds the repo you're in (or a path) so the dashboard can check its files; the dashboard can also find and add repos for you |
| `mnemolith ui` | Opens the dashboard: see what your AI remembers, and confirm or retire memories whose files changed |
| `mnemolith import` | Turns the notes in `CLAUDE.md`, `AGENTS.md`, and Cursor rules into memories; shows them first and asks |
| `mnemolith export` | Saves memories, with their linked files and history, to a JSON file (`-p` for one project) |
| `mnemolith status` | Is it running, and what's in this project's memory |
| `mnemolith doctor` | Checks everything and tells you how to fix what's wrong |
| `mnemolith list` / `recall "query"` / `explain m1` | Look at memories from the terminal |
| `mnemolith sync` | Writes current memories into `AGENTS.md` / `CLAUDE.md` |
| `mnemolith connect cursor` | Connects one tool (`--print` shows config for any other MCP tool) |
| `mnemolith start` / `stop` | Runs or stops the engine (it also starts on its own when a tool needs it) |
| `mnemolith uninstall` | Disconnects your AI tools, stops the engine, and asks before deleting memories |

If `mnemolith` isn't found after installing, run `uv tool update-shell` and open a new terminal. Port 7380 taken?
Set `MNEMOLITH_PORT` and run `setup` again. To uninstall: `mnemolith uninstall`, then `uv tool uninstall mnemolith`.

## Moving from Aether Cache

Mnemolith used to be called Aether Cache. If you installed `aether-cache`, run the installer above. It installs
Mnemolith, removes `aether-cache`, moves your memories from `~/.aether-cache` to `~/.mnemolith`, and reconnects your AI
tools. Nothing is lost, and memories synced into `CLAUDE.md` / `AGENTS.md` are picked up where they are.

Installed some other way? Install `mnemolith` the same way, run `mnemolith setup`, then remove `aether-cache`
(`uv tool uninstall aether-cache`, `pipx uninstall aether-cache`, or `pip uninstall aether-cache`).

## Tools the AI can call

| Tool | What it does |
| --- | --- |
| `remember(fact, files?)` | Saves a durable fact, optionally linked to files. Merges near-identical repeats and shows related memories so the AI can decide whether the new fact replaces one. |
| `recall(query, limit?)` | Searches the project's memories by meaning. Checks linked files first, so it never returns a memory whose code changed underneath it. |
| `explain_memory(id)` | Where a memory came from and its full history. |
| `replace_memory(old, new)` | Retires an older memory that a newer one makes untrue. |
| `mark_outdated(id, reason)` | Retires a memory that turned out to be wrong. |
| `confirm_memory(id)` | Brings back a memory that's still true after its files changed, re-linked to the current versions. |
| `check_stale()` | Runs the file check on demand. |
| `list_conflicts()` / `resolve_conflict(...)` | Reviews pairs of very similar memories that may contradict each other. |
| `sync_to_files()` | Writes current memories into `AGENTS.md` / `CLAUDE.md` (also: `mnemolith sync`). |

## Design decisions, and what the measurements said

### Similarity can't detect contradictions, so the AI judges

The first version flagged a new memory as a possible contradiction when it was similar to an existing one. Calibrating
with real `all-MiniLM-L6-v2` embeddings showed that can't work:

| Pair | Kind | Similarity |
| --- | --- | --- |
| "we use Postgres" / "the database is Postgres" | duplicate | 0.73 |
| "tests need DOCKER\_HOST set" / "you have to set DOCKER\_HOST before running tests" | duplicate | 0.92 |
| "we use Postgres" / "we migrated to MySQL" | **contradiction** | **0.30** |
| "API timeout is 30 seconds" / "API timeout is 60 seconds" | **contradiction** | **0.94** |
| "tests need DOCKER\_HOST set" / "integration tests need a running Redis" | related, both true | 0.34 |

Duplicates scored 0.73 to 0.92 and contradictions 0.30 to 0.94, so no threshold separates them. A threshold low enough
to merge real duplicates would silently merge "timeout is 30s" with "timeout is 60s", the worst bug this product could
have. So the engine only auto-merges near-identical text (similarity β‰₯ 0.97). For everything else, embeddings *find*
the related memories and the AI, which already understands the sentences, *decides* whether one replaces another.

### Staleness compares file contents, not commits

Each linked file is stored as `path@<git blob hash>`, computed with `git hash-object`. Comparing contents rather than
commit ids catches uncommitted edits, ignores commits that didn't touch the file, and needs no git hooks: `recall`
re-hashes the handful of linked files before every search.

### Memories never mutate silently

Every change is a logged event with a timestamp and a reason. The engine logs each memory *with* the id and timestamp
it assigned, so replaying the log after a restart rebuilds the exact same memories and histories, down to the
millisecond, instead of minting new ones.

## The engine unde
Anish291010
🟧 echo.github ⭐The HN post is Anish’s own launch description and links directly to his project repository; the repository is the original project artifact,Anish Chugh (@anishchugh05)β€”β€”

Interpretation history

Decision trace