codex-supermemory wires Supermemory into the OpenAI Codex CLI via hooks and skills. Your agent gets two layers of memory:Documentation Index
Fetch the complete documentation index at: https://supermemory-vorflux-codex-supermemory-plugin.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
- 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, andsupermemory-forgetskills 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:| Tag | Format | Description |
|---|---|---|
| User | codex_user_{sha256} | Memories shared across all your projects |
| Project | codex_project_{sha256} | Memories scoped to the current working directory |
Explicit Memory Skills
The installer includes three skills that Codex auto-discovers from~/.codex/skills/. They use the same SUPERMEMORY_CODEX_API_KEY as the hooks — no separate login needed.
| Skill | Description |
|---|---|
supermemory-search | Search your memories by natural-language query |
supermemory-save | Save important project knowledge to memory |
supermemory-forget | Remove outdated or incorrect memories |
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:
| Option | Default | Description |
|---|---|---|
apiKey | — | API key (overrides env var) |
similarityThreshold | 0.6 | Minimum match score for recall (0–1) |
maxMemories | 5 | Max memories injected per prompt |
maxProfileItems | 5 | Max profile facts injected per prompt |
injectProfile | true | Include user profile in context |
containerTagPrefix | "codex" | Prefix for container tags |
debug | false | Write debug logs to ~/.codex-supermemory.log |
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.

