codex-supermemory plugin
Persistent memory for Codex CLI through hooks: stack, decisions and lessons are recalled automatically and saved after each turn.
- 58 ★ on the repository
- Last commit
Extended access
Why this level
- Hooks send prompt and completed-turn content to an outside service, and the install changes Codex settings
Install
- Works in
Manual install
npx codex-supermemory installSets up hooks, MCP and skills in `~/.codex`. Removal: `npx codex-supermemory uninstall`.
Access and checks
How we reviewExtended accessThe tool runs code or makes network calls and only reads external data.
- Hooks send prompt and completed-turn content to an outside service, and the install changes Codex settings
This is third-party code. Review the repository files before installing.
What it does
codex-supermemory wires Supermemory into the Codex CLI hook system so an agent remembers your stack, preferences and decisions between sessions. Relevant memories are injected for substantive prompts through the `UserPromptSubmit` hook, with a visible recall count and a three-second network cap. Completed turns are saved in the background through the `Stop` hook. The `npx codex-supermemory install` command configures `~/.codex/config.toml` and `~/.codex/hooks.json` itself. Deeper search and explicit memory operations use the hosted MCP at `mcp.supermemory.ai` with the same credentials. Codex, Claude Code and OpenCode share one container per repository, and text wrapped in `<private>...</private>` is redacted before sending. The `$supermemory-status` and `$supermemory-index` skills check connectivity and save focused repository digests.
Who it is for. Codex CLI users tired of repeating the same project facts to the agent in every new session.
Good fit when
- Codex forgets build commands and project conventions after every restart
- Decisions and lessons from earlier sessions must be mixed in without manual pasting
- One repository is handled by Codex, Claude Code and OpenCode and memory must be shared
- A confidential fragment must not be sent and needs hiding with the `<private>` tag
Not a fit when
- Session content cannot go to an outside service and a self-hosted backend is not acceptable
- Memory is needed without a Supermemory key and account
- The agent is not Codex, since the plugin is built on Codex CLI hooks
Example request
Run $supermemory-status and show whether memory is connected, then index the repository with $supermemory-index.Limitations
A Supermemory account is needed: browser sign-in is preferred and a key can be set in `SUPERMEMORY_CODEX_API_KEY`. Memories and saved turns go to Supermemory, so confidential material is wrapped in `<private>`. Hooks tolerate failures: if the service is unreachable or the key is missing, work continues without memory. After a version upgrade `npx codex-supermemory@latest install` must be repeated, otherwise the copied hooks stay old. Self-hosted REST and MCP routing have separate settings in `~/.codex/supermemory.json`.
How to disable. Run `npx codex-supermemory uninstall` to remove hooks and configuration while your memories in Supermemory remain.
FAQ
What does the install do?
`npx codex-supermemory install` configures `~/.codex/config.toml` and `~/.codex/hooks.json` and sets up hooks, MCP and skills.
What remains after uninstall?
`uninstall` removes hooks and configuration but your memories in Supermemory are kept.
How do I hide sensitive text?
Wrap it in `<private>...</private>` and it is redacted before being sent to Supermemory.
Do different agents share memory?
Yes, Codex, Claude Code and OpenCode use one collision-safe repository container, and `sm_scope` metadata separates personal and project entries.
Can I connect my own server?
Yes, set your own REST address in `~/.codex/supermemory.json` and keep MCP hosted with a separate key or disable it.
Discussion
No questions or reviews yet.
Related
PluginsThe Supermemory plugin for Claude Code: persistent memory across sessions with automatic prompt recall, conversation capture and a codebase index
Memory for agents: a Claude Code session resumes in Codex with the same decisions and open tasks.
A long-term memory plugin that keeps decisions, preferences and task state across sessions and injects only what a query needs
Persistent memory for coding agents: insights are stored as markdown cards and recalled at the start of the next session.
The session-recall command reads an agent’s local sessions and returns past conversations in compact form, with no MCP or hooks.
Long-term memory for agents: a remote MCP server, plugins for Claude Code, Cursor and Codex, and an API for your own apps
Comparison with similar tools
Cards that share the main search query, and how they differ.
| Tool | Official | Repository stars | Main difference |
|---|---|---|---|
| codex-supermemory (this card) | yes | 58 | |
| claude-supermemory | yes | 2,803 | connects memory to Claude Code; this card installs Codex CLI hooks and a shared container for three agents |
| Supermemory Skills | yes | 117 | a set of memory skills; codex-supermemory recalls and saves automatically through hooks |
README in short
Hooks are prebuilt with esbuild, so cold starts are fast and the hooks have no dependencies. Memories show in the terminal as a recall count.