Claude Code loses your project every time it compacts
One command fixes that.
Your architecture. Your decisions. The bug you spent three hours on together. All of it, in every session, on every machine.
One command. Permanently.
See the difference
You: Keep going with the plan
Claude: I no longer have the earlier context. Could you restate the plan and which files we were changing?
An afternoon of context, gone in one compaction.
You: Keep going with the plan
Claude: Continuing: step 3 of the queue migration, swapping the Redis client behind the adapter we agreed on. Starting with lib/queue/adapter.ts.
Memory re-injected the instant compaction ends.
Sound familiar?
Compaction wiping out hours of built-up context
Re-explaining the codebase in every new session
Decisions from last week that Claude has no idea about
With MemoryRouter
Relevant project memory injected before every prompt
Every completed turn saved: your prompt and Claude's final answer. Zero tool noise.
Memory restored automatically after compaction, resume, and fork
Set up in 3 minutes
Grab your memory key, open a terminal in your project, run one command.
$ npx -y memoryrouter-claude initThe installer prompts for your Memory Key, validates it, and asks where to install: this project, this checkout only, or every project on this computer. The key stays in your home folder, never in the repo.
$ npx -y memoryrouter-claude doctorStart a new Claude Code session, then run doctor. A healthy setup ends with "Automatic memory integration is healthy."
Tell Claude one unique fact about the project. Finish the turn. Open a brand new session in the same project and ask for it. It is already there.
Sign up, copy your key, paste it in. Three minutes.
Just tell Claude Code to do it
Paste this into a Claude Code session. It asks for your key, runs the install, and verifies everything.
Install MemoryRouter automatic memory hooks for me in this project. 1. Ask me for my MemoryRouter Memory Key (from app.memoryrouter.ai) and wait for my reply before running anything. 2. Check prerequisites: run `node --version`. I need Node 18 or newer. 3. Run: npx -y memoryrouter-claude init When the installer prompts for the key, use the one I gave you. Do not write the key into any file in this repository. 4. Run: npx -y memoryrouter-claude doctor Report the result in plain language. A healthy setup ends with "Automatic memory integration is healthy." 5. Tell me to start a new Claude Code session in this project, tell you one unique fact, then open another new session and ask for that fact. That is how I confirm memory is working. Never print, log, or repeat my Memory Key in plain text after I give it to you.
How it works
Without MemoryRouter:
You Claude Code Model Response (gone at compaction)
With MemoryRouter:
You Claude Code (memory recalled on UserPromptSubmit) Model Response (saved on Stop)
Hooks fire at deterministic Claude Code lifecycle points: SessionStart warms the vault, UserPromptSubmit recalls and captures, Stop saves the final answer, and compaction, resume, and fork all re-inject memory. Your Claude account and inference stay exactly where they are. MemoryRouter only stores and retrieves memories.
Pick your scope
Project
./.claude/settings.jsonBest for teams. Commit the hook settings and every teammate gets memory. Keys stay private on each machine.
Local
./.claude/settings.local.jsonJust you, just this checkout.
User
~/.claude/settings.jsonEvery project on this computer, each with its own project memory.
Project-scoped
Each project gets its own memory partition. Worktrees of the same repo share it. Unrelated projects never mix.
Clean capture
Your prompt and Claude's final answer. Tool calls, patches, thinking, and subagent chatter are excluded automatically.
Survives everything
Compaction, resume, fork, new sessions, new machines, Claude Code updates. Your memory persists through all of it.
Key stays private
Your Memory Key lives under ~/.memoryrouter/ with owner-only permissions. Never in your repo or Claude settings.
Install in 3 minutes. 14-day free trial.
Want Claude to search memory on demand too?
Hooks are the automatic engine. Add the MCP connection and Claude also gets explicit search and store tools for when you want to ask directly.
$ npx -y memoryrouter-claude mcp install --local$ claude mcp login memoryrouterAll commands
npx -y memoryrouter-claude init # Install or upgrade hooks
npx -y memoryrouter-claude doctor # Health check
npx -y memoryrouter-claude status # Vault stats and project scope
npx -y memoryrouter-claude mcp install --local # Explicit MCP tools
npx -y memoryrouter-claude off # Remove hooks
npx -y memoryrouter-claude off --purge # Remove hooks and local state
Start free. Then just $20/mo.
14-day free trial. Cancel anytime.
- 200M memory tokens / mo included
- Unlimited projects
- Same memory in ChatGPT, Claude, Codex, and OpenClaw
- Sub-50ms retrieval
- Your keys, your data, your control
No inference markup, ever.
FAQ
Never lose a session to compaction again
14 days free. Three minutes to install. Tomorrow's first session already knows everything from today.