Memory and context

Shared memory across coding agents: Claude Code, Codex and Cursor

How Claude Code, Codex and Cursor store rules and memory, how teams share them today with AGENTS.md and MCP, and where file-based sharing stops.

Claude Code, Codex and Cursor each have two kinds of memory: instruction files that you write and commit (CLAUDE.md, AGENTS.md, .cursor/rules), and memory the tool writes itself, which stays on one machine or has been removed. Teams share the first through git. The most portable option is one AGENTS.md that all three read. What an agent learns during a session does not travel: Claude Code’s auto memory is “machine-local”, Codex memories live under ~/.codex and are off by default, and Cursor removed its Memories feature in version 2.1.17. For memory that crosses tools and people, teams point every agent at the same MCP server.

By Bombos. Published November 17, 2026. Sources checked November 17, 2026.

The short answer

  • Claude Code reads CLAUDE.md files, and reads AGENTS.md when there is no CLAUDE.md. Its auto memory “is machine-local” (Claude Code docs, memory).
  • Codex reads AGENTS.md from ~/.codex and from the project root down to the working directory, up to 32 KiB by default (OpenAI, AGENTS.md). “Local Codex memories are off by default” (OpenAI, memories).
  • Cursor has Project Rules in .cursor/rules, User Rules, Team Rules and AGENTS.md (Cursor docs, rules). A Cursor support reply says “The Memories feature was removed starting from version 2.1.17” (Cursor forum, November 24, 2025).
  • The shared layer today is AGENTS.md in the repo, plus a shared MCP configuration that points every agent at the same server.
  • The gap: lessons learned in a session stay with one person, and nothing reaches the non-coding tools on the team.

How does each coding agent store memory and rules?

Aspect Claude Code Codex Cursor
Instruction file in the repo CLAUDE.md, .claude/CLAUDE.md, .claude/rules/; AGENTS.md if no CLAUDE.md AGENTS.md, AGENTS.override.md .cursor/rules, AGENTS.md
Personal instructions ~/.claude/CLAUDE.md, CLAUDE.local.md ~/.codex/AGENTS.md User Rules
Org-wide rules Managed policy CLAUDE.md via MDM Not covered in the docs we read Team Rules on Team and Enterprise
Memory the agent writes Auto memory, per repository, machine-local Memories under ~/.codex, off by default Memories removed in 2.1.17
Shared MCP config in the repo .mcp.json Not covered in the docs we read .cursor/mcp.json

Sources: the documentation linked in this article, read November 17, 2026.

Claude Code

Claude Code has “two complementary memory systems”: CLAUDE.md files that you write, and auto memory that Claude writes “based on your corrections and preferences” (Claude Code docs). The project CLAUDE.md is shared with “Team members via source control”. Auto memory sits in ~/.claude/projects/<project>/memory/, and “Files are not shared across machines or cloud environments”. Both are “context, not enforced configuration”; for hard rules Anthropic points to hooks. We go deeper in Claude Code memory for teams.

Claude Code can read AGENTS.md directly from version 2.1.277. By default it does that only when there is no CLAUDE.md, .claude/CLAUDE.md or CLAUDE.local.md in the working directory or above it. A CLAUDE.md that imports @AGENTS.md, or the Project instructions setting claude-md-and-agents-md, loads both (same source).

Codex

Codex builds its instructions from AGENTS.md files. “Starting at the project root (typically the Git root), Codex walks down to your current working directory”, checking AGENTS.override.md, then AGENTS.md, then any fallback names in each directory. Files closer to the working directory come later and override earlier guidance. It stops adding files once the total reaches project_doc_max_bytes, “32 KiB by default” (OpenAI, AGENTS.md).

Codex also has memories. They are stored under the Codex home directory, ~/.codex by default, and “local Codex clients use a separate local memory store” from ChatGPT on the web. OpenAI’s advice is clear: “Keep required team guidance in AGENTS.md or checked-in documentation” and treat memories “as a helpful recall layer, not as the only source for rules that must always apply” (OpenAI, memories).

Cursor

Cursor supports four types of rules. Project Rules are “Stored in .cursor/rules, version-controlled and scoped to your codebase”. User Rules are “Global to your Cursor environment”. Team Rules are “Team-wide rules managed from the dashboard. Available on Team and Enterprise plans”, and can be enforced so that “the rule is required for all team members and cannot be disabled”. Cursor also reads AGENTS.md (Cursor docs, rules).

Project rules apply in one of four modes: always, when the agent decides they are relevant, for matching files, or when @-mentioned. Cursor’s earlier Memories feature, which saved facts from chats, is no longer in the current version according to a support reply on the Cursor forum, and the current rules documentation does not mention it.

How do teams share memory across coding agents today?

Four patterns, from simple to structural.

  1. One AGENTS.md as the source of truth. Codex and Cursor read it natively. Claude Code reads it when there is no CLAUDE.md; otherwise add @AGENTS.md to the CLAUDE.md. AGENTS.md is now an open format under the Linux Foundation’s Agentic AI Foundation, which says it is used by “more than 60,000 open source projects and agent frameworks” (Linux Foundation, December 9, 2025).
  2. Promote lessons by pull request. When someone corrects an agent and the correction matters, it becomes a line in AGENTS.md, reviewed like code. One way to share a lesson is to add it to AGENTS.md and review the change; Cursor’s Team Rules, managed from the dashboard, are another (Cursor docs, rules).
  3. Org-wide baselines. Claude Code’s managed CLAUDE.md, deployed through MDM, and Cursor’s enforced Team Rules give every developer the same security and style rules.
  4. A shared MCP server. Commit the same server to each tool’s project config. Claude Code: “Check .mcp.json into version control so everyone on your team gets the same MCP tools and services” (Claude Code docs, MCP). Cursor: “Create .cursor/mcp.json in your project for project-specific tools” (Cursor docs, MCP). If that server is a memory server, every agent reads and writes the same store. We compare options in best MCP memory server for a team.

Where does file-based sharing stop?

Instruction files work well for stable rules about the code. They stop working in five places:

  1. Learned memory is personal. What Claude Code or Codex learned from one developer’s corrections stays on that machine. The colleague makes the same correction again.
  2. Someone has to write it down. A lesson only reaches the team if a person turns it into a line and opens a pull request. In a busy week that does not happen.
  3. Size limits. Codex stops at 32 KiB by default. Anthropic advises keeping each CLAUDE.md under 200 lines. A growing file gets split, trimmed or ignored.
  4. No source. A line in AGENTS.md does not say who decided it, when, or why. Six months later nobody dares to remove it.
  5. Only coding tools. Product, sales and support use ChatGPT, Claude or Copilot. They never see the repo, so the same knowledge is kept twice, or not at all. See why ChatGPT or Copilot alone is not enough.

A shared MCP memory server fixes the first and part of the last, but brings its own questions: who may write, how wrong memories get corrected, and whether you can see where a memory came from. That design question is context engineering.

How does Bombos do this?

Bombos is the memory layer under the AI a team already uses: Claude Code, Codex, Cursor, Claude, ChatGPT, Copilot or your own agents. It is a plugin, not a new chat or model.

  • One shared memory that learns how the team works. It sits under Claude Code, Codex and Cursor, and under the chat tools the rest of the team uses.
  • It learns from what the team records and corrects. A correction does not stay with one engineer.
  • The source behind every answer. Every answer shows what it rests on, so the team can check a rule before it trusts it.
  • Your AI acts, Bombos remembers. Bombos does not run code or take actions. Your agents do.
  • Cloud on servers in Europe, or standalone on your own server.

Keep AGENTS.md for what belongs in the repo. Bombos sits underneath for what the team learns along the way.

Frequently asked questions

Do Claude Code, Codex and Cursor read the same file? They can. Codex and Cursor read AGENTS.md. Claude Code reads it when there is no CLAUDE.md, or through @AGENTS.md in a CLAUDE.md.

Does Cursor still have Memories? According to a Cursor support reply on its forum, Memories were removed from version 2.1.17. The current rules documentation does not mention them.

Are Codex memories shared with my team? No. They are stored locally under ~/.codex, are off by default, and OpenAI advises keeping team guidance in AGENTS.md.

How do I give all my coding agents the same memory? Commit the same MCP memory server in each tool’s project config, such as .mcp.json for Claude Code and .cursor/mcp.json for Cursor, and decide who may write to it.

Book your half hour: together we map what your AI forgets. Free, and the plan is yours, with or without Bombos.

Which sources did we use?

All sources opened and read on November 17, 2026.

  1. Claude Code docs, How Claude remembers your project: https://code.claude.com/docs/en/memory
  2. Claude Code docs, MCP: https://code.claude.com/docs/en/mcp
  3. OpenAI, Custom instructions with AGENTS.md: https://learn.chatgpt.com/docs/agent-configuration/agents-md
  4. OpenAI, Memories: https://learn.chatgpt.com/docs/customization/memories?surface=app
  5. Cursor docs, Rules: https://cursor.com/docs/context/rules
  6. Cursor docs, MCP: https://cursor.com/docs/context/mcp
  7. Cursor forum, Memories not showing (reply of November 24, 2025): https://forum.cursor.com/t/memories-not-showing/143820
  8. Linux Foundation, Agentic AI Foundation announcement (December 9, 2025): https://www.linuxfoundation.org/press/linux-foundation-announces-the-formation-of-the-agentic-ai-foundation
The first half hour · free

What does your AI forget?

  1. 01You tell us which AI you use and where it keeps starting over.
  2. 02We show what a shared memory changes there, on your own examples.
  3. 03You keep the plan, with or without Bombos.
Piet Baudoin
Piet BaudoinYou talk to Piet, from the Bombos teamDutch team from Utrecht and Nijmegen · data in Europe
We reply the same working day.