guides · featured

Agent memory — what persists, what does not

ChatGPT product memory, Claude memory files, Codex notes across windows, and why MCP memory is a different layer. Agents forget unless you give them a store.
by cache.directory updated Sep 6, 2026 CC-BY-4.0

## what it does

tl;dr

A long chat is not memory. When the window fills, the model compacts and drops detail. Product “memory” is a separate store. Claude’s memory tool is files your app owns. Codex+Astra can keep searchable notes across windows. Cursor does not see ChatGPT’s memories. If the agent should remember a decision next week, put it in a store you control.

Three layers people mix up

LayerLives whereSurvives a new chat?
Context windowThis thread onlyNo. Compaction eats it.
Product memoryVendor account (ChatGPT Memory, etc.)Yes, inside that product
Agent / MCP memoryFiles, DB, or MCP server you runYes, if every client points at it

Context engineering is how you stuff the window. This page is what you do when the window is the wrong place.

ChatGPT (product memory)

Canonical help article: Persistent memory in ChatGPT (Help Center 403’d from this IP; URL is still the FAQ).

  • Toggle: Settings → Personalization → Memory.
  • Saved memories: facts you told it to keep (or that it saved as useful). Always in future turns until you delete them. Closer to custom instructions than to a full transcript.
  • Memory summary: rolling summary of chats/files/apps. Not a complete log. Ask in-chat if you need to know whether a fact was stored.
  • Temporary Chat: no saved memory.
  • You can delete one memory, wipe all, or turn the feature off.

This is ChatGPT-only. It does not load in Claude or Cursor.

Claude (files the agent reads)

Two official mechanisms (both fetched 200 this session):

  1. Memory tool — Claude requests create/read/update/delete under /memories. Your handler maps that onto disk or a DB. Client-side. Next session continues only if you send the same tool and the same store. Restrict paths; treat writes as trusted later.
  2. Managed agent memory stores — workspace document stores mounted in the sandbox (default /mnt/memory/). Attach at session create. read_only if the agent sees untrusted web/tool output (injection → poisoned memory).

Neither is “Claude.ai automatically remembers forever” unless the product wired a store for you.

Codex + Astra (notes, not compaction-only)

From the GPT-6 Astra post: historically Codex summarized when the window filled and lost why a fix failed. With Astra, Codex can keep notes across windows and search earlier windows (requirements, test output) even if they never made the summary.

  • Experimental in Codex config.toml
  • OpenAI said it becomes default for Astra in the following weeks (from that post)

This is the closest vendor-native “agent memory” for coding loops. It is still Codex, not a shared brain with Claude Code.

MCP memory (shared across tools)

If you want Cursor and Claude Code to share facts, do not wait for the labs to interop. Run a memory MCP (or a folder the agent is told to read/write) and add it to both clients. Same pattern as any MCP server.

Gotcha: a memory MCP with write access is a persistence channel for prompt injection. Prefer append-only or human-confirm writes for anything that will be trusted next week.

Practical default

You are…Do this
Casual ChatGPTTurn Memory on; prune junk in settings.
Shipping in Claude API / Claude CodeMemory tool or a project MEMORY.md / CLAUDE.md you commit.
Long Codex / Astra runsEnable the notes-across-windows config.
Multi-tool (Cursor + Claude + ChatGPT)One MCP or one git-tracked memory file. Do not expect vendors to sync.

Paying for the frontier model does not give you memory. Astra can use a better note mechanism in Codex; it still will not recall a ChatGPT thread from Tuesday unless that product memory or a file you kept says so. Pair with pay for AI and best models by lab.

## embed this badge

cache ✓ in cache.directory
![cached](https://cache.directory/badge/agent-memory.svg)