Memory for Codex

Checked against OpenAI's Codex documentation on 25 November 2026.

Codex has two kinds of memory built in. Atlaso adds one memory that follows you to your other machines and into Claude Code, Cursor and the rest, brought in before every prompt and saved after every turn.

Free to start. No credit card needed.

Does Codex remember between sessions?

Yes, two kinds. AGENTS.md files hold instructions you write; Codex reads them at the start of every run, and project files travel with git. Local Codex memories, off by default, turn useful context from earlier chats into files on one machine. In OpenAI's words, ChatGPT web uses ChatGPT memory, while local Codex clients use a separate local memory store.

What Codex keeps on its own

What Codex keeps on its own
Kept asWhat it isWhere it livesWhat it reaches
AGENTS.mdInstructions you writeA global file in ~/.codex, then at most one per folder from the project root down to where you work, with AGENTS.override.md firstEvery run. Project files travel with git, and the chain stops at 32 KiB by default (project_doc_max_bytes)
Local Codex memoriesNotes Codex makes from earlier chats, which OpenAI calls generated state$CODEX_HOME/memories_v2/ for fresh profiles; an older memories/ folder stays if it existsThis machine. Off by default: turn them on in Settings > Personalization or with memories = true under [features], and use /memories in each chat

Checked against OpenAI's Codex documentation on 25 November 2026: Memories (opens in a new tab) and Custom instructions with AGENTS.md (opens in a new tab).

Keep required team guidance in AGENTS.md or checked-in documentation. Treat memories as a helpful recall layer, not as the only source for rules that must always apply.
OpenAI, Memories documentation

Where it stops

AGENTS.md and local memories are a good first step. Three things fall outside them.

01

One machine

The memories setting is for the selected machine, and the files live in that machine's Codex home. Your other computer keeps its own.

02

Codex's alone

Local Codex clients use a separate local memory store and controls, in OpenAI's words, apart from ChatGPT memory. Nothing in OpenAI's page carries Codex memories into Claude Code, Cursor or other tools.

03

Not right away

Memories update after a chat has been idle, not the moment it ends, and Codex may skip a pass when you are near your rate limit.

  • Each tool's own files, kept apart
  • Atlaso: one memory, joined to every tool

Clockwise from the top: Claude Code, Codex, Cursor, Claude Desktop, Antigravity and OpenCode.

What Atlaso adds

One memory outside Codex, the same on every machine and in every tool you connect.

One memory, every tool

What Codex saves is there for Claude Code, Cursor and every tool you connect, on every machine. Saving and using memories is free and unlimited.

Automatic in Codex CLI and Desktop

Atlaso brings in the memories that fit before every prompt and saves what matters after every turn. One install covers Codex CLI and Codex Desktop.

Secrets stay out

Passwords, keys and tokens Atlaso recognises are blacked out before anything is saved. We never train AI models on your memory, sell it, or use it for ads.

Yours to see and forget

Every memory is on your dashboard. Ask your memory a question, or forget a memory and it stops coming back in every tool.

Can a session start where I left off?

Sessions start caught up. With Ambient Memory, each Codex session opens with a short brief: what changed, what is still open, and what likely comes next.

*Beta. Free. Today in Claude Code and Codex.

How it works with Codex

Everything is automatic: recall runs before every prompt and capture after every turn. Codex CLI and Codex Desktop share ~/.codex, so one install covers both.

What setup installs

What setup installs in Codex
PieceWhat it does
HooksRecall before every prompt, capture after every turn
MCP toolsSave, recall, list and forget memories when you ask
SkillMemory-aware behaviours
Ambient MemoryA short brief when a session starts (Beta)

How do I give Codex memory across sessions?

One command, one sign-in, one restart.

01

Run one command

In your terminal, run curl -fsSL https://atlaso.ai/install.sh | bash. On Windows, run irm https://atlaso.ai/install.ps1 | iex in PowerShell.

02

Authorize in your browser

Your browser opens. Sign in, or create your account, and click Authorize to link this machine. You don't edit config files or paste API keys.

03

Pick Codex, then restart it

Back in the terminal, pick Codex. Restart Codex when setup finishes. One install covers Codex CLI and Codex Desktop.

Built-in memory and Atlaso, side by side

Keep what Codex does on its own. Atlaso runs beside it.

Codex on its own and with Atlaso
QuestionCodex on its ownWith Atlaso
Who writes itYou write AGENTS.md, and Codex makes local memories.Atlaso saves as you work, in every tool you connect.
Across machinesAGENTS.md travels with git. Local memories stay on the machine that made them.The same memory on every machine you link.
Across toolsAGENTS.md reaches the tools that read it. Local memories are Codex's own.Claude Code, Codex, Cursor, Claude Desktop, Antigravity, OpenCode and Grok Build.
What you controlEdit AGENTS.md, turn memories on or off, and choose per chat with /memories.See, ask and forget any memory on your dashboard.

Questions, answered

Yes, in two built-in forms. AGENTS.md files are read at the start of every run and travel with the repository. Local Codex memories, once you turn them on, turn useful context from earlier chats into files on that machine. Atlaso adds one memory that follows you across machines and tools.

Other tools

What Codex saves, your other tools can use. Atlaso keeps one memory for Claude Code, Codex, Cursor, Claude Desktop, Antigravity, OpenCode and Grok Build.

Never explain yourself twice.

Free in Claude Code, Codex, Cursor, Claude Desktop, Antigravity, OpenCode and Grok Build, with unlimited memories.

Free to start. No credit card needed.