Skip to content

Setup

How to Give Codex Persistent Memory

Connect Codex to Wenlan 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 Wenlan runtime before configuring Codex as an MCP client.

02

Run ~/.wenlan/bin/wenlan 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 Wenlan, then run ~/.wenlan/bin/wenlan mcp add codex. Restart Codex if its MCP settings require a reload, then verify with doctor or a capture/recall round trip.

Wenlan gives Codex a local memory layer that is separate from native Codex memories. Codex memories, AGENTS.md, skills, MCP, and Wenlan can complement each other: Wenlan 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 Wenlan Claude Code plugin.

  • Install the local runtime with the current setup path for your operating system.
  • Run ~/.wenlan/bin/wenlan 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 wenlan setup
~/.wenlan/bin/wenlan 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 Wenlan plugin commands like /brief or /handoff.

Try the local memory loop

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

FAQ

Does Codex share memory with Claude Code in Wenlan?+
Yes, when both clients point at the same local Wenlan 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.