codemem plugin
Coding memory across sessions, machines and teammates: decisions and dead ends flow into later prompts on their own.
- 82 ★ on the repository
- Last commit
- MIT
Extended access
Why this level
- Hooks save session activity, including tool results, and the observer model receives it for processing.
- The plugin starts a local viewer and background processes.
Install
- Works in
In your terminal, with SkillFoxx CLI
npx skillfoxx add plugins/codememDetects the agents on your machine, shows the access level and pins the version.
Other ways to install
Access and checks
How we reviewExtended accessThe tool runs code or makes network calls and only reads external data.
- Hooks save session activity, including tool results, and the observer model receives it for processing.
- The plugin starts a local viewer and background processes.
This is third-party code. Review the repository files before installing.
What it does
codemem remembers what the agent decided, what failed and which traps a repository holds, then adds the relevant pieces to later prompts without an explicit search. It works with OpenCode, Claude Code, Codex and the Pi agent, which share one store per project. Memory lives in SQLite on your machine. Retrieval is hybrid: lexical FTS5 BM25 plus semantic search through sqlite-vec with re-ranking. A local web viewer runs at `http://localhost:38888`. Optional device sync and sharing a project with a teammate are switched on separately.
Who it is for. Developers on long projects in Claude Code or OpenCode who are tired of re-explaining past decisions to the agent.
Good fit when
- In a new session the agent repeats a dead end you worked through last week.
- You use two machines and want project memory to travel with you.
- A teammate needs context on a shared repository, so you share project memory.
- You want to browse in a browser what exactly the agent remembered today.
Not a fit when
- Session activity cannot be handed to a third-party model provider.
- You need one short edit with no history and memory only gets in the way.
- The machine runs a Node.js older than required and cannot be upgraded.
Example request
Recall how we handled session caching in this repository and show which dead ends we already tried.Limitations
Node.js 24.15 or newer and npm are required. Memory is built by an observer model you choose in settings: an OpenCode account, an API key or a local Claude or Codex session. That processing can cost money or consume plan usage. Automatic injection works on OpenCode 1 and 2, and the OpenCode 2 integration is still beta. On Linux set `ONNXRUNTIME_NODE_INSTALL=skip` before the first install, otherwise an unused ONNX Runtime GPU provider is downloaded. Remote MCP access with OAuth is meant for advanced self-hosting.
How to disable. Disable the plugin in Claude Code or remove the entry from the OpenCode config, and stop the viewer. Delete the SQLite memory database separately.
FAQ
How do I install codemem in Claude Code?
Run `/plugin marketplace add kunickiaj/codemem`, then `/plugin install codemem` and restart Claude Code. The plugin bundles MCP configuration and capture hooks, so no separate CLI install is needed.
How do I check that memory is accumulating?
Run `npx -y codemem memory stats` and `npx -y codemem diagnostics capture status`. Then open `http://localhost:38888` and look for the decision from your last task.
Does codemem pay for the model?
The store itself is local. The observer uses the provider you choose, so costs land on your account or plan.
What do the plugin hooks do?
The Claude Code and Codex `UserPromptSubmit` hooks talk straight to the local viewer and return `additionalContext`. They reject requests to non-loopback hosts.
Which agents are supported?
OpenCode, Claude Code, Codex and Pi. They share one store per project. Pi registers the memory tools natively and needs no MCP.
Discussion
No questions or reviews yet.
Related
PluginsShared memory for Claude Code, Codex and Cursor: a decision made in one session is recalled in another tool or on another machine.
Persistent memory for coding agents: insights are stored as markdown cards and recalled at the start of the next session.
Shared local memory for AI agents: Claude Code, Codex, Cursor and others find the agreements of past sessions in it and record new ones
Local memory for agents with a review queue: SQLite, an audit log and a token ledger, one vault for Claude Code, Codex and Cursor
Cortex keeps decisions and project context between Claude Code and Codex sessions in a local database and shows what it recalled
Memory for agents: a Claude Code session resumes in Codex with the same decisions and open tasks.
Comparison with similar tools
Cards that share the main search query, and how they differ.
| Tool | Official | Repository stars | Main difference |
|---|---|---|---|
| codemem (this card) | no | 82 | |
| Claude-Mem | no | 116,457 | saves observations from Claude Code sessions; codemem keeps a shared project store for four agents and can sync between devices |
| Episodic Memory | no | 499 | searches conversations by meaning on request; codemem injects relevant memories into every prompt on its own |
README in short
The plugin adds session memory for OpenCode, Claude Code, Codex and Pi. Data stays local, hints are injected automatically, and sync and sharing are opt-in.