Codex memory

How Codex memory works

Codex reads AGENTS.md before every task and, once you turn memories on, keeps local memory files such as MEMORY.md in ~/.codex/memories. One lives in the repository, the other on your machine. Recallium adds memory your whole team’s agents share.

  • AGENTS.md, memories and MEMORY.md, checked October 2026
  • How to enable Codex memories, and where MEMORY.md lives
  • Where built-in memory stops
  • One installer for Codex and your other agents
How far Codex’s memory reachesas of October 2026
  1. Every teammate, every agentRecallium
  2. Every teammate in Codex, through gitAGENTS.md in the repository
  3. You, on one machineCodex memories (MEMORY.md)
  4. One sessionThe chat history

ChatGPT memory is separate: it does not carry into Codex on your machine.

What Codex remembers today

  • AGENTS.md: instructions Codex reads before it starts, from ~/.codex and from each directory between the Git root and where you work (an AGENTS.override.md takes precedence in its directory). The files are joined root first, so the closest one wins, and Codex stops adding them at 32 KiB by default (project_doc_max_bytes).
  • Memories: off by default. Turn them on with memories = true under [features] in config.toml, or in the app under Settings → Personalization. Codex then turns useful context from earlier chats into local files under ~/.codex/memories/, in the background; the consolidated files are MEMORY.md and memory_summary.md.
  • ChatGPT memory is separate. ChatGPT on the web uses ChatGPT memory; Codex on your machine uses its own local memory store.

OpenAI's own guidance is to keep required team guidance in AGENTS.md and treat memories as a helpful recall layer.

How to enable Codex memories

Codex memories are off by default, and the setting is per machine. Three ways to turn them on, as of October 2026:

  1. In the Codex app: Settings → Personalization → Enable Codex memories.
  2. In config.toml: add memories = true under [features] in ~/.codex/config.toml. This is the route for Codex CLI and the IDE extension.
  3. For one chat: run /memories in an interactive CLI session to decide whether that chat reads existing memories or feeds future ones. It does not change the global setting.

Nothing appears at once. Codex builds memories in the background from earlier chats once they go idle, skips chats that are still active or very short, and redacts secrets from what it writes. It also waits until your rate-limit headroom is above memories.min_rate_limit_remaining_percent.

Chats that used MCP tools or web search are a separate switch: “Allow memories from tool-assisted chats” in the app, or memories.disable_on_external_context in config. Two more keys split the feature in half: memories.use_memories decides whether existing memories are loaded into new sessions, and memories.generate_memories whether new chats become inputs.

To wipe them, choose “Delete Codex memories” in the app. It clears that machine’s store only.

Where Codex keeps MEMORY.md

Everything Codex memories produce lives under ~/.codex/memories/. The root follows CODEX_HOME if you set it.

  • MEMORY.md, memory_summary.md and skills/: the consolidated outputs, rewritten by a background consolidation pass
  • raw_memories.md and rollout_summaries/: the per-chat inputs that pass reads, one summary file per chat it selected
  • A git baseline of its own: the folder keeps a .git so each consolidation can diff against the last one

OpenAI calls these files generated state: do not edit them by hand, and do not commit them. There is one store per machine. The IDE extension uses the store on the host it is connected to, and ChatGPT Work does not use the local store at all. For instructions the whole team should get, use AGENTS.md.

Codex shared memory for a team

Codex has persistent memory on one machine, not shared memory. Two layers come built in, and each reaches a different distance:

  • AGENTS.md, through git: every teammate’s Codex reads it, because it is committed with the repository. It carries instructions, written by hand, capped at 32 KiB.
  • MEMORY.md, on your machine: persists across your own sessions, and stops there. Nothing syncs it to a teammate, and the app’s delete clears only that machine.

What a team actually wants to share is the record: the decision behind a module, the root cause of last week’s incident, the fix that worked. That is what an MCP memory server such as Recallium holds. Every teammate’s Codex reads and writes the same repository memory, and so do their other agents in Claude Code, Cursor and Copilot. AGENTS.md keeps the rules; the shared memory keeps the reasoning.

Where built-in memory stops

  • AGENTS.md is written by hand and loaded whole. It holds standing instructions, and it is capped, so it has to stay small.
  • Memories are local. They live in your Codex home directory and do not reach a teammate's Codex.
  • Neither crosses tools. What Codex learns does not reach the same repository in Claude Code or Cursor.

AGENTS.md is still the right place for build commands and conventions. Most teams use both.

What Recallium adds to Codex

  • The team's reasoning, as the work lands: the approach, the decision, the root cause and the fix, each linked to its files
  • What the team settled, before the edit: Recallium finds the decisions and fixes about the code being changed and feeds them to Codex
  • Shared with your team: on Cloud Pro, every teammate's agent reads and writes the repository's memory
  • Shared with your other agents: the same memory in Claude Code, Cursor, GitHub Copilot and any MCP client
  • Handoffs: workstreams, working state and session recap carry an effort across sessions and teammates

Add Recallium to Codex

  1. Run the installer: npx -y recallium install finds Codex CLI and Codex Work, plus your other agents, and adds the MCP server
  2. Sign in: the installer opens your browser to authenticate Codex; if that did not finish, run codex mcp login recallium
  3. Check it: codex mcp list shows recallium as connected

Full steps are in the quickstart. Join the waitlist for Recallium Cloud.

Questions

Does Codex have memory?

Yes, two kinds, as of October 2026. Codex reads AGENTS.md files before every task, and it has an optional memories feature, off by default, that keeps local memory files from earlier chats. Neither reaches a teammate's Codex or your other agents; an MCP memory server such as Recallium adds that.

What is MEMORY.md in Codex?

One of the files Codex writes when memories are on. It sits in ~/.codex/memories/ with memory_summary.md, and holds what Codex consolidated from earlier chats on that machine. It is not a file you commit to the repository; for instructions the whole team should share, use AGENTS.md.

Are Codex memories shared with my team?

No. Codex memories belong to one machine: the setting and the reset both apply to that machine's memory store, and nothing syncs them to a teammate. What the team should share goes in AGENTS.md, committed to the repository, or in a shared memory such as Recallium.

How do I turn on Codex memories?

Add memories = true under [features] in ~/.codex/config.toml, or enable Codex memories in the app under Settings → Personalization. Steps, keys and the reset are in How to enable Codex memories above.

AGENTS.md or Recallium?

AGENTS.md for the instructions Codex should follow every time. Recallium for the team's record: the decisions, root causes and fixes agents work out, searched when they are relevant.

Do Codex memories work with MCP?

Yes, separately. Codex can keep chats that used MCP tools out of its own memory generation (memories.disable_on_external_context); Recallium stores what the agent saves through MCP either way.

One memory under every agent your team runs.

Recallium gives Codex the decisions and fixes your team already worked out, and keeps them in step with your other agents. Join the waitlist for Recallium Cloud, the managed engineering memory for your team.