Skip to content

Setup

How to Give Codex Persistent Memory

Connect Codex to Origin through MCP so sessions can recall local project context instead of starting from scratch.

Qi-Xuan LuUpdated 5 min read

Article packet

01

Workflows

02

Codex users working across repeated coding sessions

03

5 min read

01

Install the Origin runtime before configuring Codex as an MCP client.

02

Run ~/.origin/bin/origin mcp add codex to write the client config when supported.

03

Use MCP context, capture, recall, and doctor tools from Codex.

01

Quick answer

Set up Origin, then run ~/.origin/bin/origin mcp add codex. Restart Codex if its MCP settings require a reload, then verify with doctor or a capture/recall round trip.

Origin gives Codex a local memory layer that is separate from native Codex memories. Codex memories, AGENTS.md, skills, MCP, and Origin can complement each other: Origin is the shared local store that other MCP clients can also use.

02

When this problem appears

Codex sessions are useful for implementation work, but project decisions, review lessons, and setup gotchas disappear if they only live in the chat transcript.

03

Connect Codex through MCP

Use the MCP-only setup path because Codex does not install the Origin Claude Code plugin.

  • Install the local runtime with the current setup path for your operating system.
  • Run ~/.origin/bin/origin mcp add codex.
  • Restart Codex if the client does not pick up MCP changes live.
  • Call the doctor tool or run a small capture/recall test.
  • Use handoff-like captures at the end of serious Codex sessions.

Codex MCP setup

npx -y @7xuanlu/origin setup
~/.origin/bin/origin mcp add codex

04

What to check next

MCP-only clients get tools, not Claude Code slash commands. Use context and capture through the MCP tool list instead of expecting Origin plugin commands like /brief or /handoff.

Try the local memory loop

Install Origin, connect your AI client, and verify that capture, recall, and handoff work on your machine.

FAQ

Does Codex share memory with Claude Code in Origin?+
Yes, when both clients point at the same local Origin daemon. The clients differ, but the daemon is the source of truth.
Should I store every Codex transcript?+
No. Store the durable parts: decisions, lessons, gotchas, project facts, and handoff context future sessions need.