- Implicit (hooks) — automatically recalls context before each prompt and captures completed turns in the background.
- Explicit (MCP tools) — lets you or the agent search, save, list, and forget memories on demand.
Install the plugin
- Copies the pre-bundled hook scripts and MCP proxy to
~/.codex/supermemory/ - Registers the
supermemoryMCP server in~/.codex/config.toml - Registers
SessionStart,UserPromptSubmit,PreToolUse, andStophooks in~/.codex/hooks.json - Installs the
supermemory-statusandsupermemory-indexskills under~/.codex/skills/
Authenticate
Browser auth is preferred. Start Codex CLI — a browser window opens to authenticate with Supermemory. Alternatively, set an API key from API Keys:- macOS / Linux (zsh)
- macOS / Linux (bash)
- Windows (PowerShell)
How it works
Once installed, the plugin runs on every Codex session:- Recall modes — Set
recallModeto"advisory"to let the model decide when to search, or"off"to disable prompt recall. - Privacy — Content wrapped in
<private>...</private>is redacted before storage.
Memory scopes
Codex, Claude Code, and OpenCode use one container per repository:sm_scope: personal metadata. Explicit saves through the MCP tools are passed to the hosted server unchanged, so they land in your account’s active space, not the repository container. The hash comes from the normalized Git remote, so clones and linked worktrees share memory while same-named repositories do not collide. Codex still reads the older codex_user_*, codex_project_*, and other per-tool containers, so existing memories stay searchable.
Override the container in ~/.codex/supermemory.json if needed:
SUPERMEMORY_ISOLATE_WORKTREES=true to keep each worktree isolated.
Explicit memory
Search, save, list, and forget go through the hosted Supermemory MCP tools, using the same credentials as the hooks. The installer also adds two skills:
Example prompts:
Verify installation
Uninstall
Configuration
Create~/.codex/supermemory.json to override defaults:
Logging
Next steps
GitHub repository
Source code, issues, and detailed README.
Cursor plugin
Memory for your Cursor chats.