Don't re-derive what past-you already figured out.

memarium plugin distills your past Claude Code, VS Code Copilot Chat, and Codex Desktop / interactive CLI sessions into a typed memory your agent can recall — the episodes, decisions, dead ends, and durable facts behind each project. Run /memarium to digest; run /memarium-recall before any non-trivial task to surface what's relevant.

Claude Code plugin Self-contained · No external service MIT
Install View on GitHub

The friction this removes

Every coding session your AI agent runs is a one-shot. The next session, the next agent, the next morning — none of them remember what you debugged yesterday. They re-derive every architecture decision, re-discover every Mac quirk, re-read code you've already explained twice.

Your Claude Code and Codex session histories are already local. memarium reads and distills them into typed memory, and lets future sessions stand on that work.

Two slash commands

/memarium

Walks Claude Code, Copilot Chat, and Codex Desktop / interactive CLI history, then distills each session into typed memory:

  • episodes — one per work thread, carrying the arc in the body (Context / What worked / Dead ends / Open questions / Decisions) plus AI-first metadata (files_touched, commits, entities, sourceSessions).
  • facts — distilled semantic / procedural / core memory, an entity wiki, and a Q&A layer, scored for recall.

Auto-detects project from cwd; in non-project dirs it asks before doing a full sweep.

/memarium-recall

Two-stage recall before new work. Designed for AI agents to consume cheaply:

  • Stage 1 — one ranked query over the typed-memory index: the top episodes + matching facts, each with a whyRecalled reason (cheap, no full bodies).
  • Stage 2 — Read the few entries you actually need, full body.

Cheap to invoke; you can fire stage 1 on every "how did we…" question without thinking about token cost.

What recall actually does — a worked example

Recall isn't something you remember to invoke. It's something Claude reaches for itself when it notices the task probably overlaps with past work. Imagine you say to Claude:

> this integration test has been flaky for a week, fix it

You didn't ask "have we seen this before". You asked for a fix. But Claude reads "flaky test" as a recall trigger and runs /memarium-recall stage 1 first — a ranked query over your memory, cheap. Stage 1 surfaces an episode flaky-test-investigation at the top. Claude reads its body and pulls back a structured summary:

Now Claude tells you up front:

Per episode flaky-test-investigation: this same suite was flaky in
March, root cause was a timezone assumption. The mutex / timeout /
bisect paths were already tried and ruled out. Want me to apply the
same fixed-zone fix here, plus prophylactically patch the other
three suspect call sites flagged in the episode?

That last paragraph is what makes recall worth invoking unprompted. Without it, Claude would have walked the same dead ends — git log would have shown a "fix flaky test" commit, but commit messages don't record what you ruled out along the way. Episodes preserve both halves; recall surfaces them before Claude burns context exploring them again.

Install

Two commands inside Claude Code:

/plugin marketplace add june9593/memarium-plugin
/plugin install memarium

That's it. Open any Claude Code session and run /memarium to digest your local sessions, or /memarium-recall to surface past notes. No npm install, no external service, your data stays in ~/.memarium/.

Files written

Everything stays under ~/.memarium/session-repo/:

The plugin does not create or modify .git/ or any of the optional npm CLI's config files — those are owned by the cross-device sync tool when present.

Cross-device sync (optional)

To carry your sessions and memory across multiple machines, install the optional memarium npm CLI:

npm i -g memarium
memarium init

It syncs ~/.memarium/session-repo/ to a private GitHub repo across your devices. The plugin and the npm CLI cooperate on the same spool path with sessionId-keyed entries — install one, both, or neither based on what you need.

memarium npm CLI →

Project

MIT licensed · comprehensive Vitest suite covering autonomy, scan, orchestrator, digest and memory · self-contained esbuild bundle, no runtime npm install required.