Agent Upstart

Cool things people are building with agents — and practical help getting the most out of them.

Playbooks · Coding tasks

Codex memory v2: import memories from other agents

Written November 5, 2026

Memory v2 is on by default for fresh profiles and can import external-agent memories. What it remembers, where it lives, and the default the docs disagree on.

What changed

Codex CLI 0.165.0, released October 27, enabled memory v2 by default for fresh profiles and added support for importing external-agent memories into it, per the 0.165.0 release notes. Memory is Codex's way of carrying useful context from earlier work into future sessions: preferences, recurring workflows, and lessons from past tasks. Version 2 is the newer pipeline, with its own storage. Existing profiles stay on version 1 until changed.

What it remembers, and where it lives

Once memories are turned on, Codex turns useful context from eligible past chats into local memory files. It skips active or short-lived sessions, redacts secrets from generated memory fields, and updates memories in the background once a chat has been idle long enough, rather than immediately at the end of every chat. Generation can also skip a background pass when the remaining rate limit falls below a set threshold. That means a memory may not appear right away, and a session still in progress will not be summarized yet.

Memories live under the Codex home directory, ~/.codex by default. A fresh home uses a memories_v2/ store once memories are enabled; if a memories/ directory already exists, the CLI keeps using that store by default. The memories.version setting chooses a version explicitly. Treat the files as generated state: they can be inspected when troubleshooting, but hand-editing them is not the way to control what Codex remembers. Rules the whole team has to follow belong in AGENTS.md or checked-in documentation, not in memories — the docs say so directly, and a memory is a recall aid, not a guarantee.

The default the docs disagree on

The two official sources give different answers, so neither is treated here as settled. The 0.165.0 release notes say memory v2 is enabled by default for fresh profiles. The Memories documentation says local Codex memories are off by default, and must be turned on — in the desktop app under Settings > Personalization, or in the CLI by setting memories = true in the [features] section of config.toml. The docs add that once memories are enabled in a fresh home, the CLI uses the v2 store by default, while also noting that with no explicit version and memories.dual_write = false, even a fresh profile stays on v1. The honest reading is that the version default and the on-off default are two different settings, and the docs do not settle which applies on a given machine. The reader check settles it: type /memories in a session to see and choose whether the chat uses existing memories and whether it feeds future ones.

Importing memories from Claude Code

The import flow is documented in OpenAI's import guide. In Codex CLI, type /import in an idle session and choose Claude Code or Cursor. The guide's table lists "Project memories from Claude Code" as an imported item, with Memories as the destination. For memory, Claude Code is the only supported source: Cursor is a supported import source for other items, but its migration code marks it as not supporting memory. The desktop app can also import from Claude Cowork. The CLI imports up to 50 chats from the last 30 days, and importing does not change or delete the existing agent setup.

Imported memories go into the v2 store, one folder per project, and Codex queues a consolidation that folds them into the summary. Check the summary after that consolidation, because the original wording will not survive word for word. Imported material is a starting point for what Codex remembers, not a copy of what Claude Code remembered — review what it kept before relying on it, and keep anything that must always apply in AGENTS.md.

What to do

  1. Check the actual state first. Type /memories in a session. If memories are off, turn them on in Settings > Personalization or with memories = true in config.toml, then check again.
  2. Confirm which store is in use. Look under ~/.codex for memories_v2/ or memories/. Set memories.version explicitly if the default is not the version intended.
  3. Import from Claude Code, not Cursor, for memories. Run /import, choose Claude Code, and select the project memories. Review the summary after consolidation.
  4. Keep hard rules out of memory. Anything the team must follow every time belongs in AGENTS.md. Do not store secrets in memories, and review memory files before sharing a Codex home directory.

Limits

Related playbooks

Sources

Back to: Coding playbooks hub · Also: Queue a Codex message and resume the thread · Run claude-mem on your own plan, redaction on