Session amnesia
Each new Claude Code or Codex session starts without the context you already earned.
Persistent memory for Claude Code and Codex
A single Rust binary that automatically captures, distills, and injects project context across sessions: decisions, patterns, preferences, and learnings.
The problem
Context you spent hours building disappears the moment the thread ends.
Each new Claude Code or Codex session starts without the context you already earned.
Design decisions and bug-fix root causes vanish when the session ends.
The same project preferences get repeated instead of carried forward.
Long-running work is hard to resume with confidence after context compaction or a fresh session.
How it works
remem records raw session evidence, distills it in the background, then serves compact memory back through hooks and MCP.
Inject relevant project memory and preferences.
Register sessions and flush stale queues.
Queue tool observations without blocking the workflow.
Summarize and promote durable memories in the background.
Search architecture
A query is routed through BM25, entities, temporal parsing, and LIKE fallback, then merged with Reciprocal Rank Fusion.
Product proof
The site ships with the repository's existing terminal demo asset, so the first release uses real project media instead of stock visuals.
Benchmarks
Published README snapshots cover LoCoMo, internal retrieval, and local QA evaluation.
v2 optimized, session summary ingest, gpt-5.4.
Internal eval over 1,777 real memories.
Internal retrieval hit rate.
Project-scoped search validation.
Usage & cost
remem records AI usage for its own background extraction, summaries, compression, and promotion calls. The CLI reports token usage and estimated USD cost by day, week, source, project, and executor.
This repository's remem ledger was $6.18 against $17,595.10 of total agent spend.
All remem background memory calls across projects were $437.15 in the same window.
Estimated background memory cost for this repository over 8 weeks.
ccstats all-source spend over the same 2026-04-12 to 2026-06-06 window.
Install
Start with Homebrew, the prebuilt GitHub Release installer, or Cargo. Then restart your coding agent.
curl -fsSL https://raw.githubusercontent.com/majiayu000/remem/main/install.sh | sh
Single binary. Local store. Durable context for long-running engineering work.