agent-memory

What you tell Claude Code, Codex remembers.

One memory file on your machine, written and read by both tools. It happens after every turn, without you doing anything.

Claude CodeMonday, in ~/work/shop

 The evo/, evo-dash/ and evo-backend/ folders are all checkouts of the same repo. Don't open one PR per folder.

Got it. I'll treat them as one repo and branch once.
Saved to memory: several workspace dirs are checkouts of the same repo.

CodexTuesday, in ~/work/shop

 Are evo/ and evo-backend/ different repos?

They're checkouts of the same blotoutio/evo repository, not different repos. I'll make one branch and one PR.

That Codex answer is real. The fact was learned in a Claude Code session, and Codex was never told.

npx agentmemory install Buy a license, $10 once for up to 5 machines.

The installer asks for the key from your purchase email. Needs Node 20 or newer, plus the Claude CLI, the Codex CLI, or an Anthropic API key. macOS and Linux.

How it works

  1. After every turn in either tool, a hook hands the transcript to a background process. Your session never waits for it.
  2. That process sends only the turns it has not seen, secrets scrubbed, together with your current memories, to a small model, and asks what changed. It creates, updates, or deletes memory files accordingly. Each run is one git commit.
  3. Whenever memory changes, and at every session start, both tools' context files get a fresh copy: ~/.claude/CLAUDE.md and ~/.codex/AGENTS.md. Newest facts first, within a token budget you set.

Memories are plain markdown files in ~/memory, one fact each. Open the folder, edit a file, delete one, or git revert a bad run. Your existing Claude Code memory files are imported on install, so the first session already knows what Claude knew.

~/memory/
  global/prefers-pnpm.md
  global/ask-before-force-push.md
  projects/shop/qa-gate-before-rollout.md
  projects/shop/checkouts-are-one-repo.md

Privacy

There is no agent-memory server. Nothing is stored anywhere except your disk, and the license check is the only thing that talks to us.

Transcript text does leave your machine, to the model that does the extraction. That model is whichever you already use: the Claude CLI on your subscription, the Codex CLI on yours, or the Anthropic API with your own key. A regex pass removes cloud keys, tokens, private keys, and connection strings first. It is a filter, not a guarantee.

Pause reading at any time with agentmemory pause, or list repos it must never read in ~/memory/config.json.

Questions

Which tools?
Claude Code and Codex, in their terminal, desktop, and editor forms, since those share one home directory each. Cursor and the Claude.ai and ChatGPT web apps are not supported yet.
What does it cost to run?
One small model call per turn, on whichever backend you use. On the Claude or Codex CLI that comes out of your existing subscription. On the API it is a fraction of a cent per turn.
Why is the source public if it costs money?
Because it reads your transcripts, and you should be able to see exactly what it does. The license pays for the work and for updates. The code is MIT.
Why does Codex ask me to trust hooks?
Codex requires a one-time confirmation for any hook it has not seen. Run /hooks inside Codex once and accept the two agent-memory hooks.
Can I stop it?
agentmemory uninstall removes the hooks and the context blocks and leaves your memory folder alone.
Refunds?
Within 14 days, for any reason. See the terms.