Memory here means notes the harness saves from your sessions and brings back in later ones. Instruction files you write yourself, such as AGENTS.md or CLAUDE.md, are on the Instructions page.
Codex CLI and Claude Code have built-in memory. Cursor Agent and pi do not; what to use instead is below the table.
Built-in memory
| Question | Codex CLIOff until you turn it on · checked at 0.162.1 | Claude CodeOn by default · checked at 2.1.299 |
|---|---|---|
| Is it on, and how do I switch it? | Codex has built-in local memories, off by default. Turn them on with The feature is marked stable but still defaults to off; the old key Admins can force it on or off for managed users with In the ChatGPT desktop app the switch is Settings > Personalization > Enable Codex memories. Source | Auto memory is on by default in local sessions. Toggle it in a session with
Sessions in a self-hosted environment have auto memory off by default. From a background session, or a |
| Who writes memories, and when | A background job writes memories, not the chat you're in. Each time you start a turn in an interactive root session, Codex looks at your other threads that have been idle for at least 6 hours and are at most 10 days old. It summarizes up to 2 of them per pass with a low-effort model. At most every 6 hours, a sandboxed consolidation agent with no network access merges those summaries into the memory files. The agent in your chat only adds a note when you explicitly ask it to. Only CLI/TUI, IDE extension and ChatGPT desktop threads feed memories. Generation is skipped while less than 25% of your Codex rate limit remains ( Tunable with Set Secrets are redacted from the generated memory fields. Source | Claude itself writes memories during the session, when it judges something will be useful later: your role and preferences ( Each memory file's frontmatter records its kind in a |
| Where they are kept | Memories are stored under $CODEX_HOME/memories (default ~/.codex/memories). Setting Files include memory_summary.md, MEMORY.md, raw_memories.md, rollout_summaries/, skills/ and extensions/. The folder is also a local git repository that Codex uses to track changes between consolidation runs. Source | Memories live in An With Memory files are excluded from the |
| What a new session loads | At the start of each thread, Codex injects memory_summary.md as developer instructions, truncated to 2,500 tokens, together with guidance on how to use the memory folder. MEMORY.md (the searchable index), rollout_summaries/ and memory skills/ are not loaded. The agent searches or opens them on demand when a task looks related, usually in 4-6 search steps or fewer. A change to When the agent uses a memory file, its reply ends with a memory citation block.
| At the start of every session Claude Code loads the first 200 lines or first 25KB of When a write leaves MEMORY.md near or over the limit, Claude Code tells Claude to compact the index (one line per entry, details in topic files). Recalled memories come with a note on how old they are. Source |
| See and edit them | Partly There's no memory browser. To see what Codex remembers, open the Markdown files in ~/.codex/memories (start with memory_summary.md and MEMORY.md). /memories in the TUI only toggles "Use memories" and "Generate memories" and offers "Reset all memories". OpenAI calls these files generated state: you can read them, but don't edit them by hand to control behaviour, because the next consolidation rewrites them. In 0.162.1 the /memories toggles are written to config.toml as | Run |
| Make it remember something | Partly Ask the agent directly, for example "remember that we deploy with make ship". When you explicitly ask, it writes a small note to ~/.codex/memories/extensions/ad_hoc/notes/<timestamp>-<slug>.md. The next background consolidation merges the note into the memory files, so it is not available immediately. Rules that must always apply belong in AGENTS.md instead. Notes are treated as information only, never as instructions, and remembered facts are tagged "[ad-hoc note]". Source | Ask in plain language, e.g. "remember that the API tests require a local Redis instance" or "always use pnpm, not npm", and Claude saves it to auto memory. To make it a standing instruction instead, say "add this to CLAUDE.md" or edit CLAUDE.md via |
| Correct or forget something | To correct or remove one fact, ask the agent to forget or update it. It records your request as an ad-hoc note, and the next consolidation applies it. To wipe everything, run /memories > Reset all memories in the TUI, or the hidden Memories that haven't been used for 30 days drop out of consolidation ( The ChatGPT desktop app offers the same wipe as Settings > Personalization > Delete Codex memories. Source | Edit or delete the markdown files (and their line in |
| Share with a team or another machine | Not supported No. Memories stay local to one machine's Codex home and don't sync, and there's no project-level memory file to commit. Put shared team knowledge in AGENTS.md or checked-in docs, which the official docs recommend. The IDE extension uses the memory store of the Codex host it is connected to. Review the memory files before you share your ~/.codex directory. Source | Partly The main auto memory is machine-local: it is shared across worktrees of one repo but not across machines or cloud environments, and it lives outside the repo. To share, put the facts in a checked-in CLAUDE.md, or point Remote sessions can also recall from mounted team memory stores ( |
| Memory for subagents | Partly Subagents have no memory of their own. They inherit the parent's config, so they read the same global memory summary, but their threads never feed memory generation. A custom agent role can turn memory off for itself with | Yes. Add
|
No built-in memory
Cursor Agent
checked at 2026.10.12-d47ca18
The Cursor CLI (cursor-agent) has no built-in memory, so there is nothing to turn on or off. For context that carries across sessions, use project rules in .cursor/rules or an AGENTS.md/CLAUDE.md at the project root. The CLI loads these automatically. The editor's beta Memories feature (added in Cursor 1.0) was removed in Cursor 2.1.x.
Cloud Automations are the one Cursor surface with memory today: their Memories tool is on by default and can be disabled per automation. It does not apply to cursor-agent or editor chats.
SourceThere is no 'remember this' command. Add the fact to a rule yourself, ask the agent to edit .cursor/rules or AGENTS.md, or run cursor-agent generate-rule to create a rule interactively.
pi
checked at 1.2.0
Pi has no built-in memory, so there is nothing to turn on or off. Persistent guidance comes from context files (AGENTS.md or CLAUDE.md) that you write, which load automatically; --no-context-files (-nc) disables them for one run. For saved memory, install a Pi package or write an extension.
Pi is minimal by design. Its README says it skips features like sub-agents and plan mode and leaves them to extensions and packages.
SourceThere is no remember command. Add the fact to AGENTS.md in the project (or ~/.pi/agent/AGENTS.md for every project), either by hand or by asking Pi to edit the file.