Local-first memory for Claude Code and OpenAI Codex

Stop re-explaining your project every new session.

An open-source Rust CLI and MCP memory server that automatically captures, searches, audits, injects, and verifies local project memory across Claude Code, OpenAI Codex, and Codex CLI sessions.

  • Single Rust binary
  • Localhost only
  • SQLCipher at rest
  • MIT licensed
claude - remem

The problem

Every new session starts from zero.

Context you spent hours building disappears the moment the thread ends.

01

Session amnesia

Each new Claude Code or Codex session starts without the context you already earned.

02

Lost rationale

Design decisions and bug-fix root causes vanish when the session ends.

03

Preference fatigue

The same project preferences get repeated instead of carried forward.

04

No continuity

Long-running work is hard to resume with confidence after context compaction or a fresh session.

How it works

Hooks into your agents. Nothing to capture by hand.

remem records raw session evidence, distills it in the background, then serves compact memory back through hooks and MCP.

Claude Code SessionStart

Inject relevant project memory and preferences.

Claude Code UserPromptSubmit

Register sessions and flush stale queues.

Claude Code PostToolUse

Queue tool observations without blocking the workflow.

Claude Code / OpenAI Codex Stop

Summarize and promote durable memories in the background.

Product proof

The memory arrives before the work begins.

Current releases ship through GitHub, crates.io, npm, and Homebrew, with reproducible artifact checks guarding public benchmark and claim wording.

Animated terminal demo of remem injecting memory context
Terminal demo from the remem repository assets.

Benchmarks

Measured, not hand-waved.

Public artifacts now separate memory-system capability evidence from coding-agent outcome claims.

Public artifacts 125 files

4 manifests, 4 reports, and 25 run artifacts verified.

Memory QA suite 8 runs

Temporal answers, stale decisions, conflicts, file anchors, and user-context relevance.

Policy suite 15 cases

Secrets, credentials, unsafe claims, stale anchors, and unresolved conflicts.

Claim gate Directional

No SOTA or coding-task superiority claim until the public gate passes.

Usage & cost

Measured locally, reported as estimates.

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.

  • Provider/log usage is separated from text-estimated fallback rows.
  • Cost is an estimate, not a provider invoice or subscription bill.
  • Executor and model selection live in ~/.remem/config.toml.
  • The local audit below is a snapshot from 2026-06-06; usage varies by workload.
remem usage --days 14 --weeks 8
Daily and weekly totals Project-scoped reports Usage source precision Estimated USD cost
provider/log rows stay separate from estimates
cost estimate, not invoice
Project ledger share 0.04%

This repository's remem ledger was $6.18 against $17,595.10 of total agent spend.

Full remem ledger share 2.48%

All remem background memory calls across projects were $437.15 in the same window.

Project ledger cost $6.18

Estimated background memory cost for this repository over 8 weeks.

Total agent spend $17.6k

ccstats all-source spend over the same 2026-04-12 to 2026-06-06 window.

Install

Use the same commands as the README.

Start with Homebrew, npm, the prebuilt GitHub Release installer, or Cargo. Then restart your coding agent.

curl -fsSL https://raw.githubusercontent.com/majiayu000/remem/main/install.sh | sh

Give Claude Code and OpenAI Codex a local memory layer.

Single binary. Local store. Searchable, auditable context for long-running engineering work.