Captures decisions, bug fixes, and learnings from every Claude Code and Codex session — and injects them back on the next one, in either agent. No cloud. No config. Just memory.
At session end, a small model (Claude Haiku via your API key or the claude CLI, or Codex via the codex CLI) extracts durable observations from the transcript — decisions, bug fixes, learnings, commands — and stores them in a local SQLite database.
⚡
Auto-Inject on Every Prompt
The UserPromptSubmit hook retrieves the most relevant memories via BM25 and injects them before every message. No manual recall step needed.
🌶️
Prompt Cache
Exact and fuzzy-matched prompts skip the model entirely. The cache saves API credits and keeps sessions fast.
🤝
One Memory, Every Agent
Claude Code and Codex share the same per-project memory. Fix a bug in one agent and the other already knows tomorrow. Any MCP client can call recall and remember too.
🥕
Local-Only Storage
All data lives in a local SQLite WAL database at ~/.somtum/. No cloud accounts, no telemetry. Transcripts leave your machine only for extraction, through the backend you choose.
🌐
Global Memory
Store personal preferences or workspace conventions once with `scope='global'` — they are injected across every project automatically via ~/.somtum/global.db.
🔁
Memory Deduplication
After each session, near-duplicate observations are detected by title similarity and the older one is marked superseded. Your memory stays clean without manual pruning.
📊
Visual Dashboard
Run `somtum serve` to open a browser dashboard — searchable memory browser, knowledge graph, analytics, and a forget button. GitHub dark theme, readable at any zoom.
🔄
Multi-Device Sync
Synchronize memories across machines with SSH. Hostname-aware merging ensures no data loss across sessions from different machines.
npm install -g somtumsomtum init --all # Claude Code: hooks + MCP server in this projectsomtum init --agent codex # Codex: hooks + MCP server in this project
That's it. Every session from here will be captured and remembered, whichever agent you use.