Blog
Claude Code memory vs Codex, Cursor and Copilot memory
Published: September 23, 2026
Claude Code auto memory is a folder of notes per repository, kept on your machine. Codex memories are local files under ~/.codex, off by default. Copilot Memory keeps per repository facts on GitHub and deletes what goes unused for 28 days. Cursor removed Memories in 2.1. None of them holds what your team decided.
Every fact below was checked against the vendor's own documentation on 2026-09-23: Claude Code 2.1.280, Codex CLI 0.156.1, Copilot Memory in public preview, and Cursor's current rules docs. These features change monthly. If you read this later, check the linked page before you trust a row.
What is Claude Code auto memory?
Claude Code has two memory systems. CLAUDE.md files are instructions you write. Auto memory is notes Claude writes itself while it works. The Claude Code memory docs list four kinds of note: user (your role and preferences), feedback (corrections you gave), project (decisions and deadlines the code does not show) and reference (where to look outside the repo).
It lives at ~/.claude/projects/<project>/memory/. The project path comes from the git repository, so every worktree of one repo shares one folder. The docs are plain about the boundary: “Auto memory is machine-local.” Files are not shared across machines or cloud environments.
At the start of every session Claude Code loads the first 200 lines or 25KB of the MEMORY.md index, whichever comes first. Memory files do not expire; they stay until you or Claude edits or deletes them. You review them by opening /memory, which also toggles the feature. It is on by default.
One newer variant: Claude Code Projects, in public beta on Pro and Max, keeps a separate project memory that every cloud thread in that project reads. It is still one person's project, and the docs say it is not yet available on Team or Enterprise plans.
Where does Codex store memories?
Codex memories are local. The Codex memories docs say they live under your Codex home, ~/.codex/memories/, and include summaries, durable entries, recent inputs and supporting evidence from prior chats. Codex writes them in the background once a chat has been idle for a while, skips short sessions, and redacts secrets from generated fields.
Local Codex memories are off by default. You turn them on in settings or with memories = true under [features] in config.toml. The docs treat the files as generated state and advise against hand editing them as your main control. Control is per chat with /memories. No expiry is documented.
OpenAI's own advice is the useful line here: keep required team guidance in AGENTS.md or checked in documentation, and treat memories as a recall layer, not the only source for rules that must always apply.
Does Copilot Memory work across a team?
Partly. It is the only one of the four with a shared layer. GitHub's Copilot Memory docs describe two kinds of memory. Repository facts are available to every user with Copilot Memory access to that repository. User preferences stay with one user, across repositories.
Repository facts carry citations to the code that supports them and are validated against the current branch before use. Anything unused for 28 days is deleted automatically. Repository owners can review and delete repository facts. It is used by the Copilot cloud agent, Copilot code review and Copilot CLI. It is on by default for individual plans; on organization plans an admin enables the policy first. It is in public preview.
So Copilot Memory is shared, but per repository and only inside Copilot. A fact a Copilot agent learned about your payments service does not reach Claude Code or Codex, and nobody approves it before it is used.
What happened to Cursor memories?
Cursor shipped Memories in 2025 and removed them. A Cursor staff reply on the forum (25 November 2025) says “The Memories feature was intentionally removed starting from version 2.1.x” and tells users to export them and paste them into rules.
What Cursor has today is rules: project rules in .cursor/rules, user rules that apply to all your projects, AGENTS.md, and Team Rules that admins manage from a dashboard on Team and Enterprise plans. Team Rules are the closest thing to team memory in any of these tools. They are written by an admin by hand, not learned.
Cursor Projects, in beta since 10 September 2026, add shared context: files that sync across every machine a project's agents use, where agents add what they learn about the codebase. Like Claude Code Projects, the unit is a project, and the agents write to it directly.
Claude Code memory vs Codex, Cursor and Copilot
| Claude Code | Codex | Cursor | GitHub Copilot | |
|---|---|---|---|---|
| Learned memory | Auto memory, on by default | Memories, off by default | Removed in 2.1; rules instead | Copilot Memory, public preview |
| Scope | One machine, one repository | One machine, your Codex home | Rules: project, user or team | Repository facts, plus per user preferences |
| Where stored | ~/.claude/projects/<project>/memory/ | ~/.codex/memories/ | .cursor/rules, settings, team dashboard | GitHub |
| Expiry | None; kept until edited or deleted | None documented | None; rules are edited by hand | Deleted after 28 days unused |
| Who reviews | You, in /memory, after the fact | You, by reading generated files | Rule authors; admins for Team Rules | Repo owners can review and delete |
| Shared with teammates | No | No | Project rules via git; Team Rules | Repository facts, within Copilot |
| Shared across tools | No | No | No | No |
Read the last two rows together. Each tool's memory is either yours alone or scoped to one repository inside one vendor. The one shared layer that crosses tools today is a file in git: CLAUDE.md, AGENTS.md, .cursor/rules. Our note on whether to commit CLAUDE.md covers what that file should hold.
Is agent memory the same as team knowledge?
No. Agent memory answers “what did this agent learn while working with me?” Team knowledge answers “what did we decide?” They are different objects with different rules.
Take one decision from #eng-payments: payment webhook handlers dedupe on the provider's event id before any write. It was argued in Slack and settled in a PR review thread. For it to reach every agent, four things have to be true that no personal memory provides:
- It came from where the team decides. Slack threads, PR reviews, ADRs. Not from whichever agent happened to be in the room.
- Someone with authority approved it before any agent acted on it, so one wrong session cannot teach every agent a mistake.
- It reaches every tool, not only the one where it was first said. The engineer on Cursor needs it as much as the one on Claude Code.
- It retires when it stops being true. When the handler is rewritten, the fact about it should leave with it.
Personal memory is good at what it is for. Your preferred test runner, the flag you always forget. Keep it on. It is just not where a team's decisions should live.
Where Harbor fits
Harbor is the team layer none of these ship. It reads where your team already decides (Slack, PR review threads, docs, meeting transcripts), a human approves the resulting facts or a policy you set approves routine ones, and each agent is served only the facts that apply to its task on turn one. harbor init installs hooks and the MCP entry for Claude Code, Codex and Cursor, so the webhook decision reaches all three from one approved record. What a session learns comes back through harbor_record_learning and is staged for review, not served straight away.
Start with the quickstart. For the memory servers people bolt on instead, see MCP memory servers for teams, and for the file based approach, sharing memory between Claude Code, Cursor and Codex.
Questions
Where does Claude Code store auto memory?
In ~/.claude/projects/<project>/memory/, with a MEMORY.md index whose first 200 lines or 25KB load at the start of every session. All worktrees of one git repository share the folder. It is machine local and is not shared across machines or cloud environments.
Does Cursor still have Memories?
No. Cursor removed Memories starting with version 2.1 and told users to export them into rules. Cursor now uses project rules, user rules, AGENTS.md and admin managed Team Rules.
Are Codex memories on by default?
No. Local Codex memories are off by default and live under ~/.codex/memories/. You enable them in settings or with memories = true under [features] in config.toml.
Does Copilot Memory expire?
Yes. GitHub deletes any stored fact or preference that goes unused for 28 days. Repository facts are validated against the current branch before use, and repository owners can review and delete them.
Can Claude Code, Codex, Cursor and Copilot share one memory?
Not through their built in memory. Each is personal or scoped to one repository inside one vendor. The shared layers that cross tools are files in git, such as AGENTS.md, or an external MCP server that every agent connects to.