Teams

CLAUDE.md or shared team memory: what a team needs, and when a file is enough

One developer fixes a bug with Claude Code. The next day a colleague meets the same bug in Cursor. The fix sits in a chat that is gone. This page compares the file that is meant to prevent this, and the memory that goes further.

When is a CLAUDE.md enough?

A CLAUDE.md in Git is enough when one repository, one AI tool and a short list of stable rules cover your work: build commands, code style, one or two warnings. As a rule of thumb, keep it under 200 lines. The Claude Code docs say longer files use more context and reduce adherence.

If you are at that point, you need nothing more. How to trim a file that has grown: CLAUDE.md too long.

Where does a CLAUDE.md stop working for a team?

A CLAUDE.md stops working for a team in three places: it belongs to one repository, each AI tool reads its own file, and fixes keep piling up. A fix found in one repository or one editor is not known to the others unless someone copies it by hand.

  • One repository. A file belongs to the repository it sits in. Lessons in a Brain are not tied to one repository.
  • One tool per file. Claude Code reads CLAUDE.md, Copilot reads copilot-instructions.md, Cursor reads its rules folder. cachly writes the same short protocol into up to seven kinds of rule file, so every tool knows where the memory is.
  • Growth. Every fix adds a line. The file crosses the rule of thumb, and each line counts for less.

The three files compared: AGENTS.md, CLAUDE.md and copilot-instructions.md.

How do the two differ?

As of 2 December 2026, the two differ in where they live, what loads and who they reach. A CLAUDE.md is a file in Git that loads at launch. Shared memory holds lessons that search selects, in one place for every repository and editor of the team.

As of 2 December 2026
 CLAUDE.mdShared team memory
Where it livesA file in one repository, changed through Git.One Brain, shared by all repositories and editors of a team.
What the AI getsThe whole file, loaded at launch.The lessons that match the prompt. The Claude Code plugin adds up to three before each prompt.
Different editorsOne file per tool, kept in step by hand.One Brain; the protocol is written into each tool's file.
Fixes that pile upThe file grows. The Claude Code docs say adherence drops with length.Lessons are searched, so a long list does not load in full.
Rules that must always holdA line in the file.Company rules: up to 20 rules and 4,000 characters.
Protection against smuggled textYour review of the pull request.A write-time check flags lessons with smuggled instructions. See the prompt injection page.

The prompt injection page says what the write-time check covers and what it does not: prompt injection in AI coding rules.

How do I use both?

Use both. Keep the CLAUDE.md short, with stable commands and conventions. Put fixes and decisions into lessons, so they are found when the same error comes back. Put sentences that must always hold into company rules. Each has one job, and none replaces the others.

  • In the CLAUDE.md: the test command, the code style, a warning about the database.
  • In lessons: the symptom, the cause, what failed, the command that worked.
  • In company rules: "Deploys only run through make deploy." See company rules.

Does shared memory find the right fix?

On the public OmniMemEval LoCoMo table, cachly ranks first of 18 reproduced entries (90.71, as of 17 November 2026). On LongMemEval it ranks second of 16 (89.6). Both test recall of facts from long chats. They do not test a CLAUDE.md or your repository.

Source: the benchmark page, with the table and the commit it was read from. For coding teams there is an open test set, engineering-memory-bench. Its README says the set is small, so treat small gaps as noise.

What does cachly not do here?

cachly does not replace a CLAUDE.md and does not read it. A lesson is text the AI is given; it is not a technical block. If a command must never run, set that limit in your own systems, for example with a hook or an access right.

Frequently asked questions

Do I still need a CLAUDE.md if I use cachly?

Yes, for stable commands and conventions of one repository. cachly adds what a file handles badly: fixes that pile up, decisions that span repositories, and one memory for every editor your team uses.

Is 200 lines a hard limit for a CLAUDE.md?

No. It is a rule of thumb from the Claude Code docs, which advise under 200 lines per file and say that longer files use more context and reduce adherence. Past 200 lines the file still loads.

How do I share a CLAUDE.md with a team that uses different editors?

Each tool reads its own file: CLAUDE.md, AGENTS.md, copilot-instructions.md, Cursor rules and others. cachly writes the same short protocol into these files, and the lessons live in one Brain that every connected editor reads.

Which editors can share one memory?

Claude Code, Cursor, Copilot, Windsurf, Codex, Gemini CLI, JetBrains and other MCP clients connect to the same Brain. Automatic hooks differ by tool. The Claude Code plugin adds up to three matching lessons before each prompt.

More: Shared memory for a team · All docs