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.
Article packet
Workflows
Codex users working across repeated coding sessions
5 min read
01
Install the Wenlan runtime before configuring Codex as an MCP client.
02
Run ~/.wenlan/bin/wenlan connect 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 connect codex. Restart Codex if its MCP settings require a reload, then verify with doctor or a capture/recall round trip.
Wenlan gives Codex a source-backed wiki and shared local context that complement native Codex memories, AGENTS.md, skills, and MCP. The same Wenlan daemon can also serve other clients.
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 direct MCP path below when you want Codex working without a Wenlan source checkout. The Wenlan repository also ships a Codex plugin with the shared slash workflow.
- Install the local runtime with the current setup path for your operating system.
- Run ~/.wenlan/bin/wenlan connect 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 connect codex04
What to check next
The direct MCP path exposes tools such as context and capture. The Codex plugin adds Wenlan slash skills such as /brief and /handoff; do not confuse the two interfaces.
Try the local memory loop
Install Wenlan, connect your AI client, and verify that capture, recall, and handoff work on your machine.
FAQ