---
title: "Share AI context across Claude Code, Cursor, Copilot"
description: "Put shared rules in one AGENTS.md, import it from CLAUDE.md and keep tool-specific files small. What each tool learns on its own stays per tool."
image: "https://bombos.ai/assets/og-en-v2.png"
---

# 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.

*Piet Baudoin · published November 16, 2026 · November 16, 2026*

## 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](https://bombos.ai/en/knowledge-base/what-is-context-engineering/) and [how to give AI agents your company context](https://bombos.ai/en/knowledge-base/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](https://agents.md/)
2.  [Claude Code docs: How Claude remembers your project](https://code.claude.com/docs/en/memory)
3.  [Cursor docs: Rules](https://cursor.com/docs/context/rules)
4.  [GitHub Docs: Adding repository custom instructions for GitHub Copilot](https://docs.github.com/en/copilot/how-tos/configure-custom-instructions/add-repository-instructions)
5.  [GitHub Docs: About Copilot Memory](https://docs.github.com/en/copilot/concepts/prompting-and-context/copilot-memory)
6.  [GitHub Docs: Support for different types of custom instructions](https://docs.github.com/en/copilot/reference/custom-instructions-support)
7.  [Codex: Custom instructions with AGENTS.md](https://learn.chatgpt.com/docs/agent-configuration/agents-md)

## 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](https://bombos.ai/assets/team/piet-klein.jpg)

**Piet Baudoin**You talk to Piet, from the Bombos teamDutch team from Utrecht and Nijmegen · data in Europe

## More questions about By type of team

-   [Can a marketing agency share Claude Projects and AI memory across its team, client by client?](https://bombos.ai/en/questions/by-team/marketing-agency-shared-ai-memory-per-client/)
-   [How does a sales team give every rep's AI the same account context?](https://bombos.ai/en/questions/by-team/sales-team-shared-ai-account-context/)
-   [Can a law firm share AI memory across matters and lawyers?](https://bombos.ai/en/questions/by-team/can-law-firm-share-ai-memory-across-matters/)
-   [Can a healthcare team share AI projects and memory when patient data is involved?](https://bombos.ai/en/questions/by-team/healthcare-team-shared-ai-memory-patient-data/)
-   [How does an accounting firm share AI memory without mixing up client files?](https://bombos.ai/en/questions/by-team/accounting-firm-ai-memory-per-client/)
-   [How does a support team get its AI to use what agents already solved in past tickets?](https://bombos.ai/en/questions/by-team/support-team-ai-knowledge-from-past-tickets/)
-   [How can a consulting firm reuse what it learned on past engagements with AI, without mixing client data?](https://bombos.ai/en/questions/by-team/consulting-firm-reuse-ai-knowledge-across-clients/)

[All questions about By type of team →](https://bombos.ai/en/questions/by-team/)


---

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://bombos.ai/#organization","name":"Bombos","url":"https://bombos.ai/","logo":"https://bombos.ai/assets/bombos-bee.png","description":"Bombos is the memory layer under every AI your team uses. One shared memory for Claude, ChatGPT, Copilot, Cursor and your own agents, that learns how you work.","sameAs":["https://www.linkedin.com/company/bombos-ai","https://www.youtube.com/@truebombos","https://www.instagram.com/truebombos/","https://bsky.app/profile/bombostrue.bsky.social","https://www.threads.com/@truebombos","https://mastodon.social/@Bombos","https://www.tiktok.com/@truebombos","https://t.me/truebombos","https://www.pinterest.com/truebombos/","https://github.com/bombos-ai","https://linktr.ee/bombos.ai","https://bombosai.substack.com","https://hashnode.com/@bombosai","https://hackernoon.com/u/bombos","https://dev.to/bombos"],"email":"info@bombos.ai","areaServed":["NL","Europe"],"knowsLanguage":["nl","en"],"contactPoint":{"@type":"ContactPoint","email":"info@bombos.ai","contactType":"sales","url":"https://bombos.ai/en/contact/","availableLanguage":["nl","en"]}},{"@type":"WebSite","@id":"https://bombos.ai/#website","name":"Bombos","url":"https://bombos.ai/","inLanguage":["nl-NL","en"],"publisher":{"@id":"https://bombos.ai/#organization"}}]}

{"@context":"https://schema.org","@type":"Article","headline":"How do you share the same AI context across a dev team using Claude Code, Cursor and Copilot?","description":"Put shared rules in one AGENTS.md, import it from CLAUDE.md and keep tool-specific files small. What each tool learns on its own stays per tool.","abstract":"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.","datePublished":"2026-11-16T00:00:00.000Z","dateModified":"2026-11-16T00:00:00.000Z","author":{"@type":"Person","name":"Piet Baudoin"},"publisher":{"@type":"Organization","@id":"https://bombos.ai/#organization","name":"Bombos","logo":{"@type":"ImageObject","url":"https://bombos.ai/assets/bombos-bee.png"}},"image":"https://bombos.ai/assets/og-en-v2.png","mainEntityOfPage":"https://bombos.ai/en/questions/by-team/share-ai-context-dev-team-claude-code-cursor-copilot/","inLanguage":"en-US","isPartOf":{"@type":"CollectionPage","name":"By type of team","url":"https://bombos.ai/en/questions/by-team/"},"citation":[{"@type":"CreativeWork","name":"AGENTS.md","url":"https://agents.md"},{"@type":"CreativeWork","name":"Claude Code docs: How Claude remembers your project","url":"https://code.claude.com/docs/en/memory"},{"@type":"CreativeWork","name":"Cursor docs: Rules","url":"https://cursor.com/docs/context/rules"},{"@type":"CreativeWork","name":"GitHub Docs: Adding repository custom instructions for GitHub Copilot","url":"https://docs.github.com/en/copilot/how-tos/configure-custom-instructions/add-repository-instructions"},{"@type":"CreativeWork","name":"GitHub Docs: About Copilot Memory","url":"https://docs.github.com/en/copilot/concepts/prompting-and-context/copilot-memory"},{"@type":"CreativeWork","name":"GitHub Docs: Support for different types of custom instructions","url":"https://docs.github.com/en/copilot/reference/custom-instructions-support"},{"@type":"CreativeWork","name":"Codex: Custom instructions with AGENTS.md","url":"https://learn.chatgpt.com/docs/agent-configuration/agents-md"}]}

{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Bombos","item":"https://bombos.ai/en/"},{"@type":"ListItem","position":2,"name":"Questions","item":"https://bombos.ai/en/questions/"},{"@type":"ListItem","position":3,"name":"By type of team","item":"https://bombos.ai/en/questions/by-team/"},{"@type":"ListItem","position":4,"name":"How do you share the same AI context across a dev team using Claude Code, Cursor and Copilot?","item":"https://bombos.ai/en/questions/by-team/share-ai-context-dev-team-claude-code-cursor-copilot/"}]}

{"@context":"https://schema.org","@type":"FAQPage","mainEntity":[{"@type":"Question","name":"Does Claude Code memory sync between teammates?","acceptedAnswer":{"@type":"Answer","text":"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/."}},{"@type":"Question","name":"What if a repo has both CLAUDE.md and AGENTS.md?","acceptedAnswer":{"@type":"Answer","text":"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."}},{"@type":"Question","name":"Does Copilot read CLAUDE.md?","acceptedAnswer":{"@type":"Answer","text":"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."}},{"@type":"Question","name":"How long should these files be?","acceptedAnswer":{"@type":"Answer","text":"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."}}]}
```
