# How Does a Team Share Context with AI Coding Agents?

> Teams share agent context in three layers: repo instruction files, personal memory, and team memory per repository. What belongs in each, as of October 2026.

Published October 19, 2026 · by the AQ team · Canonical: https://aq.dev/guides/team-memory-for-coding-agents/

A team shares context with AI coding agents through three layers: instruction files checked into the repository (AGENTS.md, CLAUDE.md, Cursor rules), each person's private agent memory (Claude Code auto memory, Codex memories, ChatGPT memory), and a team memory store that lives with the repository instead of with one person. As of October 2026, only the first layer is shared by default: every major vendor memory is per person, most are per machine, and none crosses tools. The layer where agents actually learn things (corrections, gotchas, decisions) is exactly the layer nothing shares. This guide defines the three layers, says what belongs in each, and covers how teams keep five engineers' agents working from one set of conventions instead of five private ones.

## The three layers of team context

One sentence each; the sharing properties follow from where the text physically lives:

- **Instruction files in the repository**: Markdown you write and check in (AGENTS.md, CLAUDE.md, .cursor/rules), loaded at session start, shared with everyone and every tool through git.
- **Personal memory**: notes an agent writes about you and your projects, stored under your own account or home directory, invisible to teammates and usually to your other machines.
- **Team memory per repository**: learned context that belongs to the codebase rather than to a person, readable and writable by the whole team, whichever tool each person runs.

Vendors ship the first layer well, the second by default, and the third barely at all. The table shows where each mechanism sits, verified on vendor documentation in October 2026:

| Mechanism | Layer | Who can read it | Crosses machines? |
| --- | --- | --- | --- |
| Repo AGENTS.md / CLAUDE.md / .cursor/rules | Instruction files | Whole team, every tool that reads the file | Yes, via git |
| Claude Code auto memory | Personal | You, in Claude Code only | No (machine-local, per repository) |
| Codex memories | Personal | You, in Codex only (off by default) | No (per machine, under the Codex home) |
| ChatGPT memory | Personal | You, even inside a Business workspace | Yes (account-level), but never teammates |
| Cursor Team Rules | Team (rules only) | Whole team, inside Cursor only | Yes (dashboard-managed) |
| Shared memory store (MCP server or harness-level) | Team | Whole team, any tool connected to it | Yes |

## Layer 1: instruction files in the repository

Required rules belong here: build and test commands, code style, the map of the codebase, security boundaries, commit and PR conventions. It is the only layer every tool reads and every teammate gets automatically. A single [AGENTS.md](https://aq.dev/glossary/agents-md/) at the repository root now reaches Codex, Cursor, OpenCode, Devin, Copilot's coding agent, and more; Claude Code can read a repository's AGENTS.md in place of CLAUDE.md as of October 2026, and if you keep both files, [keep them in sync](https://aq.dev/guides/keep-agents-md-and-claude-md-in-sync/) rather than letting them drift.

Two practical limits, both from vendor docs as of October 2026: Codex caps combined AGENTS.md content at 32 KiB by default (raisable in config), and Anthropic's guidance is to keep each CLAUDE.md under roughly 200 lines because long files reduce adherence. Both point the same direction: this layer is for durable rules, not a dumping ground. The discipline that makes it work is treating the file like code: changes arrive by pull request, a reviewer checks them, and lessons from agent sessions get deliberately promoted into it. OpenAI's own Codex guidance says the quiet part directly: required team rules belong in AGENTS.md or checked-in docs, not in memories.

## Layer 2: personal memory, and what actually lives there

Every vendor now ships some version of an agent that remembers you, and every one is scoped to one person:

- **Claude Code auto memory** has Claude write notes on your corrections and preferences per repository, loaded each session from an index capped at 200 lines or 25 KB. Anthropic's docs state it plainly: auto memory is machine-local, not shared across machines or cloud environments, and teammates never see it.
- **Codex memories** (off by default as of October 2026) summarize past threads into files under the Codex home directory, enabled per machine. OpenAI recommends treating them as a recall aid, with required rules in AGENTS.md.
- **ChatGPT memory** is tied to each individual account. OpenAI's Business memory FAQ answers the sharing question with a flat no: memories cannot be transferred to other users, even within the same workspace.
- **Cursor** removed its automatically generated Memories feature from the product UI starting in version 2.1 (November 2025), pointing users at exporting memories into Rules; its current docs describe Rules and AGENTS.md as the persistence mechanisms.

This layer is the right home for your role, your working style, the way you like commits written. The trap is everything else: when your agent learns that the integration tests need a seeded database, that is a fact about the repository, not about you, and once it lands in your personal memory no teammate and no other tool will ever find it. The mechanics of each store are covered in [how coding agents remember](https://aq.dev/guides/coding-agent-memory-explained/), and the cross-tool view in [can Claude Code and Codex share memory](https://aq.dev/guides/shared-memory-across-coding-agents/).

## Layer 3: team memory per repository

The third layer is the one vendors mostly have not built: learned context that belongs to the codebase and is visible to the whole team. What belongs here is everything too operational or too fresh for the instruction file but too useful to lose: the gotcha an agent hit in the deploy script, the half-finished test runner migration, the convention that emerged three PRs ago and is written down nowhere. These facts age and need curation, which is exactly why a 200-line instruction file is the wrong home for all of them.

As of October 2026 teams assemble this layer from parts. The lowest-tech version is promotion by hand: a habit of moving lessons out of sessions and into the repo's AGENTS.md or a docs folder through PRs. It works, it is reviewable, and it depends entirely on people remembering to do it. Cursor's Team Rules are the one vendor mechanism that is genuinely team-scoped: on Team and Enterprise plans, admins manage rules from the dashboard and can enforce them so individuals cannot turn them off. But they are rules a person writes, not memory an agent accumulates, and they apply only inside Cursor. The build-it-yourself version is a shared memory service wired in over [MCP](https://aq.dev/guides/mcp-servers-for-coding-agents-explained/), giving several tools one store to read and write; that gets the architecture right at the cost of running and securing another service, deciding who can write, and scrubbing secrets yourself.

## Why per-person memory silently fragments a team

Nothing announces the fragmentation; it just compounds. Five engineers run agents on one repository and each accumulates a private pile of corrections. One person's Claude Code knows the test database quirk. Another's Codex memories know the deploy order. A third wrote the API convention into their personal rules file. Each individual's agent gets steadily better while the team's shared baseline stays frozen, and every new teammate (and every new tool anyone adopts) starts from zero against conventions somebody already taught an agent, in a store nobody else can read.

The collaboration numbers suggest how easily this goes unnoticed: a July 2026 [LeadDev analysis](https://leaddev.com/ai/ai-coding-agents-kill-team-collaboration) of 25,264 agent-generated pull requests across 2,361 popular GitHub repositories found that in 79 percent of agentic PRs the same developer both reviewed and modified the agent's contribution, and only about one in eight workflows involved multiple humans. When agent work loops through a single person end to end, that person's private memory is the only place the lessons land, and nothing in the default tooling pushes them anywhere shared.

The durable fix is structural, not disciplinary: decide which layer each kind of fact belongs in, and make the team layer real. Required rules go in the repo file, reviewed like code. Personal taste stays personal. Repository knowledge goes somewhere every agent and teammate can reach, with visible authorship, review, and a way to expire what goes stale. Teams rolling agents out (see [rolling out coding agents to your team](https://aq.dev/guides/rolling-out-coding-agents-to-your-team/)) do well to set this up before the private piles get large, and to weigh the team layer when [choosing collaboration tooling](https://aq.dev/guides/best-ai-coding-tools-for-team-collaboration/).

## Where AQ fits

AQ is the multiplayer coding harness where engineering teams run AI coding agents like Claude Code and Codex together: shared live terminals, a code editor, and app previews, in your own cloud. AQ ships the team layer as a built-in, live since October 16, 2026, in both halves of the problem.

For rules, your organization keeps one shared rules file and AQ syncs it into each CLI's own home on the workspace machine (Claude Code, Codex, OpenCode, Kimi, Grok, and Antigravity), between markers that preserve anything personal around them; a repository's own tracked AGENTS.md is never modified. Write the rule once and every harness on the team reads it. For learned context, AQ adds memory notes that live with the repository instead of with one person's laptop: organization notes are shared with the whole team per repository, each naming who added it, while personal notes stay yours. Any agent AQ runs can search them and save new ones mid-run through AQ's MCP server (see [AQ's MCP docs](https://aq.dev/docs/mcp/)), so a lesson one person's Codex learns is there for a teammate's Claude Code the next morning. Nothing is injected into a session uninvited, secret-shaped values are refused at save time, near-duplicates merge instead of piling up, and notes nobody has used for 28 days expire, which is the curation half that hand-rolled shared stores usually skip. The Free plan is a personal sandbox with nothing to install; team memory ships with the AQ Pro plan at $50 per user per month early access pricing (standard $200, billed monthly).

## Frequently asked questions

### Can my whole team share one ChatGPT or Claude memory?

No. As of October 2026, ChatGPT memories are tied to each individual account and cannot be transferred to other users, even inside the same Business workspace, per OpenAI's own memory FAQ. Claude Code's auto memory is machine-local and per repository under your own home directory. Team-readable context has to live in a checked-in instruction file or a shared store both agents can query.

### Should team conventions go in AGENTS.md or in agent memory?

In AGENTS.md (or CLAUDE.md), checked into the repository. OpenAI's Codex guidance says required team rules belong in AGENTS.md or checked-in docs, with memories treated as a recall aid; Anthropic's docs similarly position CLAUDE.md as the instructions layer. Personal memory is the right home only for individual preferences, because no teammate or other tool can read it.

### What is the difference between an instruction file and agent memory?

An instruction file is text a person writes and the agent loads every session: deliberate, reviewable, and shared through git. Agent memory is text the agent writes itself from what it observes: automatic, private to one person, and in most tools local to one machine. Teams need both, plus a third layer for learned repository knowledge that the whole team can read.

### How do Cursor Team Rules work?

On Cursor's Team and Enterprise plans, admins create plain-text rules in the Cursor dashboard and choose per rule whether it is enforced; an enforced rule cannot be disabled by individual users and takes precedence over project and user rules. As of October 2026 they are the one vendor memory mechanism scoped to a team, but they are hand-written rules rather than accumulated memory, and they apply only inside Cursor.

### How do teams keep shared agent context from going stale?

Treat the instruction file like code: changes arrive by pull request and a reviewer checks them, so wrong entries get caught the way wrong code does. For the learned layer, prefer stores with visible authorship and expiry; AQ's memory notes, for example, name who added each organization note and expire notes nobody has used for 28 days. A standing habit of promoting session lessons into the repo file keeps the durable layer current.

---

About AQ: AQ is the multiplayer coding harness where engineering teams run AI coding agents like Claude Code and Codex together: shared live terminals, a code editor, and app previews, in your own cloud. Start at [aq.dev](https://aq.dev/).
