Claude Code, Codex and Cursor
How can a team share one memory in Claude Code?
Alexandru Lupascu, CTO & Co-founder · Updated
In Claude Code, a team shares memory through files committed to the repository, mainly a project CLAUDE.md and the .claude/rules/ directory, because auto memory, the notes Claude writes itself, is machine-local. According to Anthropic's Claude Code docs, auto memory files "are not shared across machines or cloud environments", so each developer's learned corrections stay on that developer's machine. Organizations can add a managed CLAUDE.md that IT deploys to every developer machine. Keeping one team memory current therefore means curating shared files by hand, or adding a system outside Claude Code.
Which Claude Code memory files can a team share?
Only files that reach every machine, through git or device management, are shared. Based on the Claude Code memory, settings and subagent docs:
| File | How it is shared | Who gets it |
|---|---|---|
./CLAUDE.md or ./.claude/CLAUDE.md | Committed to git | Everyone who clones the repository |
.claude/rules/*.md | Committed to git | Everyone; rules with paths load for matching files |
.claude/settings.json | Committed to git | Team permissions, hooks and plugins |
| Managed CLAUDE.md | MDM, Group Policy, Ansible or similar | All users on the machine |
.claude/agent-memory/<name>/ | Subagent with memory: project, committed to git | Everyone using that subagent |
Auto memory and CLAUDE.local.md | Not shared | Only you |
How do you set up shared team memory in Claude Code?
Treat the shared files as code that the whole team maintains:
- Run
/init, trim the result to under 200 lines, and commit the project CLAUDE.md. - Split topic rules into
.claude/rules/, such astesting.mdorapi-design.md, and scope them withpathsfrontmatter. - Commit
.claude/settings.jsonwith hooks for anything that must always happen, because CLAUDE.md guides Claude but does not enforce. - When Claude makes the same mistake a second time, which the docs list as a reason to update CLAUDE.md, add the fix in a pull request so teammates review it.
- For company-wide rules, deploy a managed CLAUDE.md at
/Library/Application Support/ClaudeCode/CLAUDE.mdon macOS or/etc/claude-code/CLAUDE.mdon Linux. - Give recurring roles, such as a code reviewer, a subagent with
memory: project, so its learnings live in the repository and can be committed with the code.
What are the limits of file-based team memory?
File-based memory is static and only as current as the last person who edited it. A correction one developer gives Claude goes into that developer's auto memory, not the team's files, unless someone copies it over. When two instruction files disagree, the Claude Code docs say Claude "may pick one arbitrarily". Claude Code's Projects feature keeps project memory across cloud threads, but according to its docs a project belongs to one user and cannot be shared, and during the public beta it is offered on Pro and Max plans, not on Team or Enterprise. If your teammates use several coding agents, see one memory across coding agents.
Where does a runtime like elephant.broker fit?
elephant.broker is a pluggable runtime for AI agents for teams whose agents need the same knowledge across developers, sessions and tools. According to its website, elephant.broker assembles context on every turn from your tools, teammates and past sessions, writes decisions, corrections and outcomes back after each turn, and, when two sources conflict, places both and weighs them by proof. Every read, placement and write-back is recorded in a tamper-evident audit log. elephant.broker connects to Claude Code through an MCP server, native plugins or a REST API, runs single-tenant by default, and can be self-hosted inside your own VPC. For a small team in one repository, a committed CLAUDE.md and rules directory are usually enough. For agents beyond Claude Code, see how multiple AI agents share memory.
Sources
- Anthropic: Claude Code memory docs, Claude Code settings, Claude Code subagents, Claude Code Projects
- elephant.broker: overview, features, security and deployment
Product details come from each vendor's public documentation as viewed on 2026-10-23 and may have changed. Product names are trademarks of their respective owners; elephant.broker is not affiliated with them.