r/AgentsOfAI • • 16h ago

I Made This 🤖 I gave Claude Code, Codex and OpenCode one shared memory, and it changed how I hand off work between them

Disclosure: I built the tool this is about (free and open source, link in the comments).

The problem I kept hitting: I'd use Claude Code for one part of a project and Codex for another, and each one started from zero. I'd re-explain the same decisions, the same gotchas, the same "don't touch that file".

What I ended up with is a per-project memory that every agent reads and writes over MCP. When an agent learns something durable (a decision, a workaround that actually worked, a build quirk) it saves a short fact. The next agent, whichever one it is, recalls the relevant facts at the start instead of re-reading the repo. A few things that turned out to matter:

  • Facts are tagged with which agent and machine wrote them, so you can tell where a claim came from.
  • Facts that never get recalled fade out over time, so the memory doesn't turn into a junk drawer.
  • Superseding is explicit: a new fact replaces an old one rather than both hanging around and contradicting each other.
  • Local models get the same memory and tools, so a small Ollama model can pick up where Claude left off on simple tasks.

It all runs locally on a Mac. The memory is a SQLite file on disk, there's no account and nothing goes to a server unless you pick a cloud model.

Curious how others handle this. Are you keeping hand-written notes files, a vector store, or just re-prompting every time?

1 Upvotes

6 comments sorted by

1

u/JoeBro121211 16h ago

Link, as promised: https://github.com/joexk1/JoeBro (GPLv3, macOS). The memory part is an MCP server, so any MCP-capable agent can use it.

1

u/limpingdarrell 15h ago

That's a clever approach. The fade-out for unused facts solves the exact problem I've had with context bloat in long-running projects. Does the recall work on keyword matching or is there some lightweight embedding happening under the hood?

1

u/JoeBro121211 15h ago

Keyword matching, no embeddings. It's token-set overlap weighted by how rare each word is in that project's memory, with a boost when the words hit a fact's topic label. It works better than I expected because the facts are kept small (one decision or gotcha each), so there isn't much noise to match against.

The fade-out is a strength score with a half-life: every recall bumps it, and facts that sit unused decay until they stop showing up. Embeddings are on my list to try as a hybrid, but I wanted to see how far plain lexical recall goes first. So far it's further than I thought.

1

u/the_crooked_badger 11h ago

the machine tags matter, otherwise 'works on my machine' gets exported as project truth

1

u/JoeBro121211 7h ago

Exactly. A fix that only worked on one laptop, recalled on a different machine as if it's universal, is worse than no memory at all. Seeing the host next to the fact makes it obvious when something is machine-specific.

1

u/AutoModerator 16h ago

Thank you for your submission! To keep our community healthy, please ensure you've followed our rules.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.