Codex CLI memory

Codex CLI Memory: local project memory through hooks and MCP.

remem connects to Codex CLI with SessionStart and Stop hooks, then exposes project memory through MCP tools and CLI search.

  • Codex hooks
  • MCP registration
  • Strict duplicate gating
  • Local database
codex - remem

$ remem install --target codex

ok Codex MCP server registered

ok Codex hooks configured

$ remem search "review threads"

decision green CI alone is not enough

preference separate remote truth from local state

auditable recall available mid-session

How it helps Codex

Codex gets continuity without a hosted memory service.

The same local store powers automatic session injection, MCP search, manual saves, workstreams, and timelines.

01

Session context

SessionStart injects compact memories and preferences.

02

Stop summaries

Stop hooks summarize durable lessons in the background.

03

MCP tools

Codex can call `search`, `save_memory`, `timeline`, and workstream tools.

04

Local audit

`remem why`, status, and usage commands make recall inspectable.

Install

Connect remem to Codex CLI.

Install the binary, configure Codex hooks and MCP, then restart Codex.

brew install majiayu000/tap/remem
remem install --target codex
remem doctor
remem search "last decision"

First recall

Verify project memory after restarting Codex.

Open a terminal in the repository whose history you want to inspect. Check installation health, then search for a decision you actually made there:

remem doctor
remem status
remem search "deployment decision" --branch main --explain

Use your relevant branch instead of main. If a result is returned, use its memory ID to inspect the content and evidence:

remem show <memory-id>
remem why <memory-id>
remem doctor truth --cwd .

Confirm the project, source, and staleness before relying on a result. Search is an inspection surface and may include labeled legacy_unverified memories that default startup context excludes. The truth doctor is a read-only diagnostic.

An empty search does not establish a broken install or a healthy capture pipeline. Check the reported executable paths, hook/MCP registration, database health, and worker state in installation verification. Capture and background distillation are separate stages.

FAQ

Common Codex CLI memory questions.

ScopeWhich project is searched?

Run the walkthrough from the intended repository. Project scope and branch filters matter when checking a missing decision; inspect a result before treating it as current truth.

FilesDo I keep AGENTS.md?

Yes. Keep stable project instructions in native files. remem adds searchable engineering history; see native memory and remem and the MCP interface.

StartupWhy is startup quiet?

Duplicate-injection gating can suppress repeated context. Use explicit search and the memory evidence view instead of treating silence as proof that history is absent.

Use the current release and documentation index for supported commands. Report reproducible installation problems through GitHub issues with the version and redacted diagnostics. Read the security policy for sensitive reports and the MIT license for reuse.