- Implicit (hooks) — automatically recalls context before each prompt and captures conversations after each session.
- Explicit (skills) — lets you or the agent save, search, and manage memories on demand.
Get Your API Key
Create a Supermemory API key from the API Keys page, then export it in your shell profile:- macOS / Linux (zsh)
- macOS / Linux (bash)
- Windows (PowerShell)
Install the Plugin
- Copies hook and skill scripts to
~/.codex/supermemory/ - Enables
codex_hooks = truein~/.codex/config.toml - Registers
UserPromptSubmit(recall) andStop(capture) hooks in~/.codex/hooks.json - Installs
supermemory-search,supermemory-save,supermemory-forget, andsupermemory-statusskills to~/.codex/skills/
How It Works
Once installed, the plugin runs automatically on every Codex session:- Recall — Before each prompt, relevant memories and your user profile are fetched from Supermemory and injected as additional context.
- Capture — After each session ends, the conversation transcript is ingested into Supermemory, scoped to the current project and user.
- Privacy — Content wrapped in
<private>...</private>tags is redacted before storage.
Memory Scopes
Memories are tagged with two container tags per session, auto-derived from your environment:
Tags are generated automatically — no configuration needed. You can override them in
~/.codex/supermemory.json if needed:
Explicit Memory Skills
The installer includes four skills that Codex auto-discovers from~/.codex/skills/. They use the same SUPERMEMORY_CODEX_API_KEY as the hooks — no separate login needed.
These skills let you interact with memory explicitly — for example:
Verify Installation
Uninstall
~/.codex/supermemory/, removes skill directories from ~/.codex/skills/, and disables codex_hooks in ~/.codex/config.toml. Your existing memories in Supermemory are preserved.
Configuration
Create~/.codex/supermemory.json to override defaults:
Logging
Enable debug logging to trace hook activity:Next Steps
GitHub Repository
Source code, issues, and detailed README.
Claude Code Plugin
Memory plugin for Claude Code.