How do you share the same AI context across a dev team using Claude Code, Cursor and Copilot?

Short answer

Put what everyone needs to know in an AGENTS.md at the repo root and import it with @AGENTS.md at the top of your CLAUDE.md. Cursor, Codex and the agent features of Copilot read AGENTS.md directly; Claude Code only when there is no CLAUDE.md or CLAUDE.local.md. What the tools remember on their own, like auto memory and Copilot Memory, stays per tool.

Every tool reads a different file

A team on three AI tools quickly ends up with three places for the same conventions. As of November 2026, this is where each tool looks:

Tool Own files Reads AGENTS.md? What the tool remembers by itself
Claude Code CLAUDE.md, .claude/rules/, CLAUDE.local.md Yes, from v2.1.277 when there is no CLAUDE.md or CLAUDE.local.md, otherwise via @AGENTS.md Auto memory, per repository, in local sessions
Cursor .cursor/rules/*.mdc, User Rules, Team Rules Yes, at the root and in subfolders No shared memory in the rules docs
GitHub Copilot .github/copilot-instructions.md, .github/instructions/*.instructions.md Cloud agent, Copilot CLI and code review on GitHub.com do; Copilot Chat in VS Code does, in Visual Studio and JetBrains it does not Copilot Memory: repository facts and user preferences
Codex AGENTS.md and AGENTS.override.md It is its native format No shared memory in the AGENTS.md docs

AGENTS.md is an open format stewarded by the Agentic AI Foundation under the Linux Foundation. Its site lists Codex, Cursor, Copilot coding agent, Gemini CLI, Windsurf, Devin and Aider among the tools that read it. Claude Code is not on that list, but the Claude Code docs say it reads AGENTS.md. Of the files in the table, AGENTS.md is the only one all four tools read, at least in their agent mode.

A setup that works

  1. One AGENTS.md at the root with what every agent needs: how to build and test, code style, the folder layout, what is off limits. Keep it short.
  2. A CLAUDE.md with @AGENTS.md at the top, followed only by what is specific to Claude Code. Without that import, Claude Code skips AGENTS.md as soon as a CLAUDE.md exists. Imports go up to four levels deep.
  3. Cursor rules only for path-specific conventions, as .mdc files with globs in .cursor/rules/. A plain .md in that folder is ignored.
  4. Keep .github/copilot-instructions.md short, with the few rules that must also apply in Copilot Chat. It is the one file every Copilot environment reads; Copilot Chat on GitHub.com, in Visual Studio and in JetBrains does not read AGENTS.md. Use .instructions.md with applyTo only for per-file-type rules.
  5. Personal preferences stay out of the repo: ~/.claude/CLAUDE.md, Cursor User Rules, Copilot personal instructions. A CLAUDE.local.md works too, but then keep the AGENTS.md import in your CLAUDE.md, or Claude Code skips AGENTS.md.
  6. Rules for every repo belong at the organization level: Team Rules in the Cursor dashboard (Teams and Enterprise), organization instructions in Copilot, a managed CLAUDE.md that IT deploys to each machine.

A minimal setup looks like this:

AGENTS.md                          # build, test, style, what is off limits
CLAUDE.md                          # @AGENTS.md, then only Claude-specific notes
.cursor/rules/frontend.mdc         # globs: src/web/**
.github/copilot-instructions.md    # three rules for Copilot Chat

Then check per tool what actually loaded. In Claude Code, /memory lists the instruction files in the session. In Copilot Chat, instruction files that were used appear in the references under the answer. In Cursor and Codex, ask the agent at the start of a session which rules it has.

The misconception: a shared file is not shared memory

With one AGENTS.md, all tools share the same instructions. They do not share what they learn. That is a different kind of context, and it stays split:

  • Claude Code auto memory is written by Claude, per repository. The first 200 lines or 25 KB, whichever comes first, load every session. It lives on the machine of whoever ran the session, not in git.
  • Copilot Memory stores repository facts that collaborators in that repo can see, but they are not pooled across repos and do not travel to forks. By default they expire after 90 days; on Business and Enterprise an owner can set 7 to 180 days. Copilot checks a memory before using it, and when it upvotes it, the clock restarts.
  • Whatever was worked out in a Cursor chat stays in that chat.

If a teammate learns in Claude Code that the test database has to be reset first, Cursor will not know tomorrow, and Copilot only if it happened to be saved as a repository fact. Someone has to add it to AGENTS.md by hand. If nobody does, every tool learns it again.

Two more points teams often miss:

  • Instructions are context, not enforcement. Claude Code usually follows CLAUDE.md, but to enforce something you use a hook, such as a PreToolUse hook.
  • Rules do not affect Cursor Tab. Inline completions do not see your rules.

What this means for the team

A shared AGENTS.md solves half the problem: everyone starts from the same rules in every tool. The other half, knowledge created during the work and knowledge outside the repo (the issue, the client email, the decision from the standup), has no shared home in this setup. When someone switches tool or hands work over, it travels only if someone writes it down. For the broader picture, see what context engineering is and how to give AI agents your company context.

Where Bombos fits

Bombos is a plugin that gives Claude Code, Cursor, Copilot, Codex and your own agents one shared memory. What a teammate learns in one tool becomes a rule the next tool already knows, and the memory also reads what is already there in repos, issues and documents, with a visible trail of what each answer rests on. It runs in the cloud or on your own server, and one developer can try it first for their own agents.

Related questions

Does Claude Code memory sync between teammates?

No. Auto memory is written by Claude per repository in local sessions and lives on the machine running the session, not in git. What is shared is what you commit: CLAUDE.md, AGENTS.md and .claude/rules/.

What if a repo has both CLAUDE.md and AGENTS.md?

Claude Code then reads only CLAUDE.md, unless CLAUDE.md imports AGENTS.md with @AGENTS.md. The same applies when someone has a CLAUDE.local.md, including in a parent folder. That one import line keeps the two from drifting apart.

Does Copilot read CLAUDE.md?

Partly. The cloud agent, code review on GitHub.com and Copilot CLI read a CLAUDE.md at the root. Copilot Chat in VS Code, Visual Studio and JetBrains does not; only .github/copilot-instructions.md works everywhere.

How long should these files be?

Anthropic recommends under 200 lines per CLAUDE.md, Cursor under 500 lines per rule, and Codex reads up to 32 KiB of project instructions by default. Keep the shared file short and point to details.

Sources

  1. AGENTS.md
  2. Claude Code docs: How Claude remembers your project
  3. Cursor docs: Rules
  4. GitHub Docs: Adding repository custom instructions for GitHub Copilot
  5. GitHub Docs: About Copilot Memory
  6. GitHub Docs: Support for different types of custom instructions
  7. Codex: Custom instructions with AGENTS.md
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.