A new Claude Code or Codex session often does not know the preferences and
project decisions from your earlier conversations, so you end up repeating
them. Cairn.ink Memory gives both tools one shared memory. Each memory keeps
the text it was saved from, so when one is wrong or out of date you can see
where it came from, then correct it or forget it.
Every memory has a source. Each one keeps the text it was saved from, so
you can check it before you trust it.
You can change it. Correct a memory when things change, or forget it.
One memory for both tools. Claude Code and Codex read and write the same
store.
Your choice of home. A database on your computer with no account, or
cairn.ink when you want the same memory on every computer.
You need Node 22.16 or later, and Claude Code or Codex on your PATH.
Known issue: on Node.js 24.22.3, whose built-in SQLite is 3.54, some searches run slower, so recall can return fewer results when you have a lot of saved memory. Your saved data isn't affected. Node.js 22, or Node.js 24 up to 24.22.2, works as before. Setup uses the Node.js that ran it, so run setup again after you switch versions.
To skip the question, run npx @cairn-ink/memory setup --local or
npx @cairn-ink/memory setup --cloud. Restart Claude Code and Codex when setup
finishes. In Codex, also open /hooks and allow the Cairn entries. A computer
runs one mode at a time, and memories do not move between modes.
The package is @cairn-ink/memory. The unscoped packages named cairn-memory
on npm and PyPI are unrelated projects.
Use it
After a Local install, Claude Code and Codex both have memory tools from a
server named cairn-local. Ask in plain words:
Remember that my reports should be short.
In a later session:
What do you remember about how I like reports?
Show me where that memory came from.
Correct it: I need detailed reports now.
Forget that memory.
If your agent does not reach for the memory tools, name them: “use the
cairn-local memory tools”.
Local mode also saves your conversations as you work, so you can ask about them
later (on Linux and WSL, and for Claude Code on macOS; see Status):
What did we decide about the database migration last week?
Search over saved conversations catches up in the background: new turns are
usually searchable within seconds, but older conversations can take a while to
show up after setup or an upgrade.