MemoryRouter
OpenAI Codex

Codex forgets your project the moment the session ends
One command fixes that.

Your decisions. Your stack. Where you left off. Every new session opens already knowing all of it.

Under 2 minutes. Permanently.

14 days free

Full access. Connect it, watch Codex remember, cancel anytime.

See the difference

WITHOUT MEMORY

You: Finish the auth refactor we started

Codex: I don't have context on a prior refactor. Which files are involved, and what approach did you want?

Ten minutes of re-explaining what you decided yesterday.

WITH MEMORYROUTER

You: Finish the auth refactor we started

Codex: Continuing from yesterday: moving session checks into middleware, keeping the legacy cookie path behind the flag we agreed on. Starting with routes/auth.ts.

Already knows. Starts building immediately.

Sound familiar?

Re-pasting architecture notes into every new session

Compaction wiping out an afternoon of context mid-task

Decisions you made last week, gone

With MemoryRouter

Relevant project memory injected before every prompt

Your request and Codex's final answer saved after every turn. No tool noise.

Checkpoint before compaction, recall right after. Codex never loses the thread.

Start free

14-day free trial. Cancel anytime.

Connect Codex in under 2 minutes

One command adds MemoryRouter. Codex opens your browser, you sign in, you pick your vault. Done.

Step 1: Add MemoryRouter to Codex
$ codex mcp add memoryrouter --url https://mcp.memoryrouter.ai/mcp

Run this in any terminal. Codex 0.146 or newer.

Step 2: Sign in and pick your vault
$ codex mcp login memoryrouter

Codex opens your browser. Sign in with GitHub or Google and choose the vault Codex should use. Codex now has search_memories and store_memory.

THEN MAKE IT AUTOMATIC

Automatic memory on every turn

Install the hooks and Codex recalls and remembers on its own. Copy your memory key first, then run these.

Step 3: Install the hooks (key passed via stdin, never shell history)
$ printf '%s' "$MEMORYROUTER_API_KEY" | npx -y memoryrouter-codex init --scope user --auth oauth --api-key-stdin

Replace $MEMORYROUTER_API_KEY with your key or export it first. On macOS you can also run pbpaste | npx -y memoryrouter-codex init --scope user --auth oauth --api-key-stdin after copying the key.

Step 4: Trust the hooks and verify
$ npx -y memoryrouter-codex doctor --scope user

Open Codex, run /hooks, and trust the MemoryRouter definitions. Then run doctor. Save a unique fact in one session, open a new one in the same project, and ask for it. That is the moment it clicks.

Get my memory key

Sign up, copy your key, paste it in. Two minutes.

Or just tell Codex to do it

Codex runs shell commands on its own. Paste this prompt into a Codex session and it handles the install, asks for your key, and verifies everything.

You are going to install MemoryRouter's automatic memory hooks for me in Codex. Follow these steps in order.

1. Before doing anything else, ask me to paste my MemoryRouter Memory Key (from app.memoryrouter.ai). Wait for my reply. Do not run any commands until you have it.

2. Check prerequisites: run `node --version` and `codex --version`. I need Node 18 or newer and Codex 0.146 or newer. If either is missing or too old, tell me exactly what to install or upgrade, then stop.

3. Once I give you the key, show me this exact command first with the key masked, then run it after I confirm. Pass the key through stdin only, never into a file or shell history:

printf '%s' "<MY_KEY>" | npx -y memoryrouter-codex init --scope user --auth oauth --api-key-stdin

4. Tell me to run /hooks in Codex and trust the MemoryRouter hook definitions. Then tell me to run `codex mcp login memoryrouter` and finish the browser sign-in myself.

5. Run this command and report the results in plain language:

npx -y memoryrouter-codex doctor --scope user

Then suggest a quick test: I save a unique fact in this session, open a new Codex session in the same project, and ask it to recall that fact.

Rules for the whole process: show me every command before running it, and never print, log, or repeat my Memory Key back to me in plain text once I have given it to you.

How it works

Without MemoryRouter:

You Codex Model Response (gone when the session ends)

With MemoryRouter:

You Codex (memory recalled on UserPromptSubmit) Model Response (saved on Stop)

Hooks fire on Codex lifecycle events: recall before every prompt, capture after every completed turn, checkpoint before compaction, recall again right after. Your OpenAI account and inference stay exactly where they are. MemoryRouter only stores and retrieves memories.

🎯 Project-scoped

Each repo gets a stable identity from its git remote. Memories never leak between projects, and worktrees of the same repo share one memory.

Clean capture

Your request and Codex's final answer. Tool names, inputs, results, and intermediate chatter are excluded automatically.

Survives everything

Compaction, new sessions, new machines, Codex updates. Your project memory persists through all of it.

🔒 Key stays private

Your Memory Key lives in an owner-only file under ~/.memoryrouter. Never in config.toml, hooks.json, AGENTS.md, or your repo.

Start free

Connect in under 2 minutes. 14-day free trial.

Everywhere Codex runs

Codex CLI

Terminal sessions in any project.

Codex IDE extension

Same config, same memory, in your editor.

ChatGPT desktop

The local Codex host reads the same setup.

All commands

codex mcp add memoryrouter --url https://mcp.memoryrouter.ai/mcp # Connect Codex

codex mcp login memoryrouter # Sign in, pick vault

npx -y memoryrouter-codex init --scope user --auth oauth --api-key-stdin # Automatic hooks

npx -y memoryrouter-codex doctor --scope user # Health check

memoryrouter-codex import --instructions # Import past Codex history

npx memoryrouter-codex uninstall # Remove hooks and managed config

Start free. Then just $20/mo.

14-day free trial. Cancel anytime.

14-DAY FREE TRIAL
$20/mo
200M tokens included every month
  • 200M memory tokens / mo included
  • Unlimited projects
  • Same memory in ChatGPT, Claude, Claude Code, and OpenClaw
  • 300 to 500 ms average recall on a typical vault
  • Your keys, your data, your control
Start free

No inference markup, ever.

FAQ

Give Codex a memory tonight

14 days free. Under two minutes to connect. Tomorrow's first session already knows everything from today.

Start free