Muninn: persistent memory for Claude Code and Codex
A memory for Claude Code and Codex that keeps up when you change your mind.
Every time you open a new session, Claude Code or Codex starts from zero, with no idea that last week you picked a database, agreed on a folder structure, or told it never to touch a certain file. So you explain it all again, or it guesses.
Memory tools fix the forgetting, but most of them remember everything, including the decisions you have since changed. Muninn remembers what you decided, and when you change your mind, it puts the old decision away. The assistant only sees what is true now.
It runs on your computer, with no cloud service and no API key. Each message takes a few thousandths of a second longer.
Source code, install and full docs on GitHub
Test results
We tested it against two popular memory tools, claude-mem and agentmemory, on tasks that depended on a decision that had later been changed.
- Changed in conversation: the assistant used the current decision in 252 of 270 tasks with Muninn, against 208 of 268 with claude-mem.
- Change also in the code: 54 of 54 with Muninn, 25 of 54 with claude-mem and 1 of 54 with agentmemory.
- A replaced value written back into the work: 0 of 54 times with Muninn, 10 of 54 with claude-mem.
Each test had its rules written down before it ran, and the raw results are in the repository. The full comparison.
Rules that block instead of rules that get ignored
Claude Code reads CLAUDE.md as context, and a rule in it can be lost when a long
conversation is compacted. Muninn turns a rule such as "never edit the migrations folder" from
CLAUDE.md, AGENTS.md or .claude/rules into Claude Code
permission rules and a deny hook, so the edit is refused before it happens. It shows you the proposed
settings first and changes nothing until you say yes.
Install
In Claude Code, one line at a time:
/plugin marketplace add ilien-dev/muninn
/plugin install muninn@muninn
For Codex, in a terminal:
codex plugin marketplace add ilien-dev/muninn
codex plugin add muninn@muninn
Then turn it on in each project with /muninn:init in Claude Code, or
muninn init for Codex. It works on Windows, macOS and Linux.
Install details.