Claude Code, Codex and OpenCode each start every session knowing nothing about the last one. If I spend an hour with Claude Code working out that the test suite needs Postgres on port 5433, Codex finds that out again the next day, the hard way.
I wanted one memory that all of them read and write, that I can look at myself, and that doesn't need a server or a model call to keep tidy. Here is how I built it in JoeBro, the free, open-source Mac app I make. The Python part is standard library only.
The shape: a local MCP server over SQLite
All three agents speak MCP, so the shared piece is a small MCP server that the app installs into each agent's config. It exposes a handful of tools, mainly memory_remember and memory_recall, plus memory_supersede and memory_forget. Everything lands in one local SQLite file. There is no account and nothing leaves the machine.
Memory is scoped. A project's key is its normalised git remote (or the repo path if there isn't one), so the same repo cloned on two machines is the same project. There is also a global scope, and a separate user scope for facts about the person. The user scope is never included in what a coding agent sees.
What goes in, and what doesn't
I only wanted what an agent learns: decisions, gotchas, what was tried. Facts are tagged by kind (fact, decision, convention, gotcha, howto, preference, handoff). Build commands and conventions stay in the files you already keep in the repo; the memory only adds a short pointer block to them, so the two don't fight.
Each fact records provenance: which agent, which model and which machine wrote it. That turns out to be the most useful part of the UI. When something looks wrong, you can see that it was Codex on the laptop last Tuesday and decide what to do about it.
Writes also refuse obvious secrets (private key blocks, sk- keys, GitHub tokens and similar patterns).
Keeping it small without a model
The failure mode of agent memory is that it grows until it is noise. I wanted the housekeeping to be boring arithmetic, not another LLM call:
- Dedupe at write time. Facts are compared by token-set overlap (Jaccard similarity). If a new fact is at least 0.8 similar to an existing one, the existing one is reinforced instead of duplicated. One catch: if the two differ by a number or identifier, like a port or "module 3" versus "module 4", they count as different facts.
- Supersede, don't overwrite. If the new fact is about the same subject (similarity above 0.5) it replaces the old one, but the old one is kept, marked superseded and linked to its replacement.
-
Strength with decay. Every fact starts at 0.5. Each recall moves it toward 1.0 (
s += (1 - s) * 0.25), and it decays with a 30 day half-life. Pinned facts don't decay. - Fade out. A nightly pass archives anything that has decayed below 0.12, and each project has a cap of 150 active facts, where the weakest go first. Archived, never deleted, so you can restore them.
The result is that facts nobody ever recalls quietly drop out, and the ones agents keep reaching for stay near the top.
The session-start brief
Pull-only memory is no good if the agent never thinks to ask. So at session start each agent gets a brief of at most 400 tokens: the strongest facts for the project plus a few global ones, ranked by pinned status and then current strength. Everything else is available through memory_recall, which returns the top five matches. Reading the brief doesn't reinforce anything, only actual recalls do, so the ranking reflects what agents really use.
Looking at it yourself
The part that makes this trustworthy for me is that it's not a black box. The workspace shows every fact with its kind, topic, age, strength bar and who wrote it, on the Mac and on the iPhone, and you can edit, pin, supersede or archive any of them.
What I'd like feedback on
The similarity measure is deliberately crude. Token overlap misses paraphrases, and I'm unsure whether to add an optional embedding step or keep the no-model rule. If you've dealt with agent memory growing out of control, I'd like to hear what worked.
JoeBro is GPLv3 and free. The one-line install (macOS 26+) sets up the app and connects it to Claude Code, Codex and OpenCode:
curl -fsSL https://joebro.pages.dev/install.sh | bash
Code: https://github.com/joexk1/JoeBro (a star helps others find it). The memory module is JoeBro/Backend/jb_sharedmem.py.

Top comments (1)
the provenance and supersede history are the strongest parts here. i'd test two agents updating the same project decision from different branches at once: token overlap could mark both facts as the same subject, even when both are valid in different contexts. could memory_supersede use a revision check and surface a conflict instead of silently replacing whichever fact loses the race? that feels more important to solve before adding embeddings.