Share Memory Between Claude Code, Codex and OpenCode
Save a fact in Claude Code, recall it in Codex or OpenCode. One memory for every agent.
You build a feature in Claude Code. You open Codex to review it. And you start explaining the project from scratch.
With Ragionex Memory, Claude Code, Codex and OpenCode share one memory. A fact saved in one agent can be recalled in the others. Use the best tool for each task without starting over.
How it works
Your memories live in a Vault in your Ragionex account. Each agent connects to your account with its own key, which the setup creates for it.
Agents using the same Vault share its memories, subject to their permissions.
Connect each agent
You need Node.js 18 or later and the agents you want to connect. Run:
Run the setup once for each agent. Open its connect link in your browser, sign in, then paste the one-time code into the terminal or the agent chat.
Or paste this line into each agent, and it runs the setup for you: Set up Ragionex Memory for yourself by following the instructions at https://ragionex.com/setup.
Quit and reopen each agent after the setup.
New to Ragionex? The full first-install walkthrough is in this Claude Code guide.
Check that they share one memory
Ask each agent:
All three should report the same Vault name and ID. If they do, they share one memory.
One record, three agents: try it
An example with a made-up project.
In Claude Code, save a decision:
Once the memory is ready, open a fresh Codex session and ask about the API:
In a fresh OpenCode session, ask about the UI:
In this example, Codex finds the job-ID rule and OpenCode finds the polling rule. Both come from the one memory you saved in Claude Code. Ask either agent to show the saved text, and you see exactly where its answer came from.
What carries over, and what does not
| Carries over | Does not carry over |
|---|---|
| Every memory you saved: decisions, setup, rules, gotchas | The other agent's chat history |
| Edits: fix a memory once, every agent sees the fix | Unsaved work in progress |
| Memories in the Vault selected for each project | Old conversations from before you connected |
Good habits for a shared memory
- Name the subject in the memory. "acme-app's imports run as background jobs" works in any agent. "Imports run in the background" can be ambiguous later.
- Update instead of adding. When a fact changes, edit the existing memory so no agent finds the old version. See the memory repair guide.
- Ask before starting a task. "Check Ragionex Memory for acme-app's import rules, then plan the page" gets the agent going with the right context.
Start free
The Free plan includes 10,000 requests every 30 days, 2 Vaults and 100 API keys. All your agents share the allowance. A new memory, a content edit or a search call is one request.
Setup details: ragionex.com/setup. Full reference: the Memory quickstart.
More field notes
-
Claude Code Keeps Forgetting? Give It a Memory That Lasts
Save your project setup once. Every new Claude Code session can recall it. One command, free to start. -
Build an AI Second Brain That Remembers Why You Decided
A copy-ready template that saves each decision with its reason, so your AI can answer “why did we do that?” -
Your AI Remembers the Wrong Things. Here's How to Fix It.
Five before-and-after examples for fixing stale facts, lost conditions and guesses saved as truth. -
See Exactly What Your AI Remembers, and Delete What It Shouldn't
Every memory your agent saved, in one list you can read, edit, delete and export. Plus a checklist for full cleanup.