If you use more than one AI coding agent, you have probably re-explained the same project to each of them. Aletheia is a free, local memory and rules hub for that problem: one SQLite store on your machine that Claude Code, Codex CLI, Cursor, Gemini CLI, Windsurf and OpenCode read over MCP, REST or the CLI. It is alpha software, Apache-2.0, with no account and no telemetry.
For 0.2.0 we did something different from adding features one by one. We ran a full gap scan, both of our own code and of claude-mem, the larger and older project in this space, and turned every finding into a task with a test that had to fail before the fix and pass after it. 28 tasks came out of it. Here is what they found and what changed.
A security hole in remote mode
The most important finding was not a missing feature. When the server was bound to a non-loopback address with no ALETHEIA_API_KEY, the Hub login protected the dashboard (/ and /api/*) but not the API the tools use. /v1/*, the live socket and /mcp answered anyone who could reach the port. Loopback installs, the default, were not affected.
0.2.0 requires a login session or the key on /v1 in remote mode, and the key on /mcp, and warns at startup when remote mode runs without a key. An independent review of that fix found three more issues, all now fixed: /mcp on loopback skipped the local-only check, so a reverse proxy in front of it exposed it; the remote login page's own security policy blocked its login request; and the sync hub checked a pairing code before its lockout. SECURITY.md records each one.
Built, tested, and never called
The scan also found features that existed as tested modules but that no command, route or hook ever called: dense vector search outside the CLI, a graph retrieval channel, a file-read gate, folder context files, a reranker. A test suite that tests modules in isolation does not catch this. 0.2.0 wires each of them in, mostly off by default, and adds a test that fails when a module in src/ has no production caller.
Memory that git worktrees can share
Agents that work in git worktrees were filing memory under <repo>/<worktree>, so every new worktree session started with nothing. Worktree sessions now use the main project's memory, project merges move every table in one transaction, and aletheia projects fold-worktrees folds old fragments into the main project, as a dry run first.
Other changes
- Scheduled local backups and
aletheia restore. - Search that finds Chinese, Japanese and Korean words inside stored text. The old FTS5 tokenizer treated a run of CJK characters as one token.
- Every prompt is redacted again right before any model call, not only at storage time.
-
team_briefandteam_searchMCP tools, an import for Claude Code's own memory files, and MCP config for Copilot CLI, Goose and Roo Code. Those configs are written from each host's docs and not tested on a real install. - A dashboard you can switch into ten languages. The translations are machine-made with no native review.
The numbers, with their caveats
We re-ran our LoCoMo retrieval comparison against claude-mem 15.17.0. Recall@5 was 43.5% for claude-mem as shipped and 57.4% for Aletheia on raw turns. That measures retrieval, not answer accuracy, and the result files and commands are in the repository so anyone can re-run them.
Try it
git clone https://github.com/mohamed-ashraf-elsaed/aletheia-mem
cd aletheia-mem
bun bin/aletheia-server.mjs
Open http://127.0.0.1:37790. It needs Bun 1.1 or newer. Or install the package with npm install -g aletheia-mem and start aletheia-server.
If you use one of the hosts we have only configured from docs (Cursor, Gemini CLI, Windsurf, Copilot CLI, Goose, Roo Code), the most useful thing you can do is try it on a real install and open an issue with the tool, its version, the command and what happened.
Top comments (5)
The worktree isolation issue is a subtle cost leak. When parallel coding sessions run in separate git worktrees, cold-starting context burns tokens re-explaining the repository architecture. Folding everything into one local store solves that, though concurrent lock contention on SQLite becomes the next failure mode once three or four agents run at once. It is also good to see a test that fails when modules have zero production callers. Passing unit tests on isolated modules often hides the fact that the pipeline never routes traffic through them.
Sharing one memory store across git worktrees fixes one of the sneakiest friction points when running parallel coding agents. Having every new worktree start cold forces you to re-seed the exact same architecture constraints over and over.
The FTS5 CJK fix is worth calling out too. SQLite's default
unicode61tokenizer treats contiguous Chinese, Japanese, or Korean character runs as a single giant token because there are no spaces to split on, which kills partial-phrase recall. Switching CJK fields to atrigramtokenizer or pre-segmenting tokens at ingest makes mixed-language technical notes and translated docs searchable without pulling in a heavy external search daemon.The obsession with wrapping remote APIs into multi-layered agent abstractions is creating massive hidden latency and failure cascades in production.
If you profile real-world workloads, bare-metal local inference (via direct C++ / llama.cpp or vLLM bindings) consistently beats fragile cloud wrappers on both predictability and cost. Tooling should eliminate abstraction penalties, not compound them.
Folding worktree sessions into the main project's memory fixes the cold start, and it also changes what a note means. A worktree usually exists because its branch differs from main. A note written there, for example that an endpoint now returns a list, can be true only on that branch, and after the fold it reaches sessions on main and on every other worktree as if it held for the whole project. If the branch is abandoned without a merge, the note stays and nothing marks it.
A task in the style of the 0.2.0 gap scan would catch it: write a branch-specific fact in a worktree session, delete the branch without merging, then ask the same question from a session on main and see whether the fact comes back. Recording the branch with each note would at least let a read on main tell a merged fact from an unmerged one.
Loading the whole memory at session start means every turn re-reads it. A hub that returns only the lessons matching the current step pays for what the step uses.