One Shared Memory: Codex Writes, Claude Code Reviews

Let Claude Code review Codex’s code with the reasons behind it, not just the diff.
Connect Codex CLI and Claude Code to one MemoryLake project over MCP. Both agents share memory: the same decisions, each traced to how it was made.

Claude Code review Codex used offset paging here. It breaks the API decision.
MemoryLakeOrders API Demo
Saved decision Cursor pagination on list endpoints. Decided in API review: offset queries timed out on 12M rows.
MD api-decisions.md
Claude Code reads why the team chose cursor paging, then flags the offset diff.

How to share memory between Codex CLI and Claude Code

Use case demo

Codex CLI writes the code and Claude Code reviews it. In API review, the team decided list endpoints use cursor pagination, because offset queries timed out on the 12-million-row orders table. Here is how both tools work from that decision on the same project.

01Connect Codex and Claude Code

Terminal MCP setup

Codex CLI · saved to ~/.codex/config.toml

codex mcp add memorylake --url https://app.memorylake.ai/memorylake/mcp/v2

Claude Code

claude mcp add --transport http --scope user memorylake https://app.memorylake.ai/memorylake/mcp/v2

Sign in with codex mcp login memorylake, and in Claude Code with /mcp → Authenticate. Pick the same workspace and memory boundary for both tools.

02MemoryLake saves the decision

Orders API Memories

Extracted from api-decisions.md

List endpoints use cursor pagination, not offset.

MemoryLake Source Trace · API review

“Switch list endpoints to cursor pagination. Offset queries timed out on the 12M-row orders table.”

Add your API notes to the project. MemoryLake extracts the decision and its reason on its own and keeps a Source Trace to the review where it was made.

03Codex checks before it writes

Codex CLI AGENTS.md

Rule for Codex

Before adding an endpoint, search MemoryLake for API decisions and follow them.

search_memory · pagination

List endpoints use cursor pagination, not offset.

Codex calls search_memory, finds the pagination rule, and builds GET /orders with a cursor.

04Claude Code reviews Codex

Claude Code ReviewExample review

Review the diff Codex wrote for GET /orders.

Searched MemoryLake · 1 memory

List endpoints use cursor pagination, not offset.

Orders API api-decisions.md

Open in MemoryLake

This endpoint pages with offset. The saved decision requires a cursor: offset timed out on 12M rows. MemoryLake

In CLAUDE.md, ask Claude Code to look up the decision behind each changed area. When a Codex diff breaks one, the review cites it.
Connect Codex and Claude Code

Free to start · One MemoryLake project for both tools

Why Claude Code reviews Codex better with shared memory

Review the decision behind it

Claude Code sees the saved decision and its source, so it stops flagging Codex’s deliberate choices as mistakes.

Keep a second opinion

Claude Code reads saved decisions, not Codex’s session. A reviewer from another company stays a real second opinion.

Protect the decision record

MCP tools only read. Neither Codex nor Claude Code can rewrite a decision; a teammate with edit permission can.

Share one set of decisions

AGENTS.md and CLAUDE.md both point to one MemoryLake project, so both tools apply the same rules.

Try a shared decision in the Playground first.

Save one decision and its reason, then check both come back before you connect Codex and Claude Code.

  1. Step 1

    Open the Playground

    Create your free account and open the Playground in your MemoryLake workspace.

  2. Step 2

    Save an API decision

    Say “Remember that list endpoints use cursor pagination, because offset queries timed out on the 12-million-row orders table.” Open Memories to inspect the saved fact.

  3. Step 3

    Ask from a fresh chat

    In a new chat, ask “How should a new list endpoint paginate, and why?” Check that the reply includes the reason.

Already have a workspace? Open your workspace, then add MemoryLake to Codex CLI and Claude Code with the commands in step 01 above.

Codex and Claude Code: Before and After Shared Memory

What changes when Codex and Claude Code read the same decisions on the same project.

Codex + Claude Code workflowWithout shared memoryWith MemoryLake
Project rulesCopied into AGENTS.md and CLAUDE.md separatelySaved once, read by both tools
Claude Code’s reviewJudges the diff aloneChecks the diff against saved decisions
Codex’s next sessionStarts without past decisionsSearches decisions before writing code
Why a choice was madeBuried in one tool’s chatTraced to where it was decided
Switching toolsRe-explain the project each timeBoth read the same MemoryLake project
Changing a decisionEach tool keeps its own copyOne record, updated by a teammate

Frequently asked questions

Can Codex and Claude Code share memory?

Yes. Connect both tools to the same MemoryLake project over MCP and pick the same workspace and memory boundary when you sign in. They read the same saved decisions. They don’t share chat history.

How do I get Claude Code to review Codex’s code?

Let Codex make the change, then ask Claude Code to review the diff. In CLAUDE.md, tell it to search MemoryLake for the decision behind each changed area and flag code that breaks one.

Can Codex review Claude Code’s work instead?

Yes. Swap the roles: put the review rule in AGENTS.md and the coding rule in CLAUDE.md. Both tools still read the same MemoryLake project.

Do I still need AGENTS.md and CLAUDE.md?

Yes. Codex reads AGENTS.md and Claude Code reads CLAUDE.md, so each file holds that tool’s instructions. MemoryLake holds the decisions and reasons both files point to.

Can Codex or Claude Code change a saved decision?

Not over MCP. MemoryLake’s MCP tools read and analyze; they don’t modify or delete memories. MemoryLake extracts decisions from the notes, documents, and Playground chats you add, and teammates with edit permission update them.

Does Claude Code see what Codex said in its session?

No. The MCP connection only reads from MemoryLake, so neither tool’s session is saved there. Claude Code sees the saved decisions and their sources, which keeps its review independent.