Blog
Published: October 6, 2026
You told Claude Code the refund window is 60 days on annual plans. Cursor did not hear you. Codex will invent 30. Each agent reads its own files, and none of them reads the others' memory.
The short answer: inside one repo, write the rules once in AGENTS.md. Codex and Cursor read it, and Claude Code reads it when there is no CLAUDE.md, or through an @AGENTS.md line in one. Across repos, no single file is read by all three. Each tool has its own place for rules that apply everywhere, and each covers only you. For a team, it is an admin setting in each tool, or one source all three agents reach.
In one repo: one AGENTS.md #
- Codex reads
AGENTS.mdfrom the repo root down to the folder you started in. Our note onwhy Codex ignores AGENTS.md covers the 32 KiB limit and the other ways it gets skipped. - Cursor reads
AGENTS.mdin the project root and in subfolders, and reads aCLAUDE.mdthe same way. - Claude Code reads
AGENTS.mdin a project with noCLAUDE.md. If you keep aCLAUDE.mdfor Claude-only notes, Anthropic's docs suggest an@AGENTS.mdline at its top. A symlink,ln -s AGENTS.md CLAUDE.md, also works, but Claude will not edit through it, and on Windows the import is the safer choice.
To check, run /context in Claude Code and look under Memory files, or run codex debug prompt-input to see what Codex sends. More in AGENTS.md vs CLAUDE.md and does Claude Code read AGENTS.md.
Across your repos: one place per tool #
Each tool has rules that apply to every project on your machine, and each keeps them somewhere different:
| Tool | Rules for every repo | Worth knowing |
|---|---|---|
| Claude Code | ~/.claude/CLAUDE.md and~/.claude/rules/ |
Both load alongside a project's files. ~/.claude/CLAUDE.md can import a file kept anywhere with@~/path , with no approval prompt. |
| Codex | ~/.codex/AGENTS.md , orAGENTS.override.md beside it |
Read before the project files. Only the first non-empty file there counts, and the override wins. |
| Cursor | User Rules in Customize, then Rules, and files in ~/.cursor/rules | User Rules live on your account and sync, and Inline Edit ignores them. The files stay on the machine. |
| Copilot CLI | ~/.copilot/copilot-instructions.md |
COPILOT_CUSTOM_INSTRUCTIONS_DIRS can point it at a folder that holds anAGENTS.md . |
None of these is read by the other tools, so the same rule still lives in three places: a file Claude imports, a file Codex reads, and a setting in Cursor. And every one of them is yours alone. Each teammate sets up their own, and they drift the day someone edits one.
Across a team's repos #
Three ways, each with a cost:
- An admin setting in each tool. Claude Code reads a managed
CLAUDE.mdplaced on every machine, or set from the claude.ai admin console on Team and Enterprise plans. Codex takes managed developer instructions inrequirements.toml. Cursor has Team Rules on Teams and Enterprise, which an admin can enforce. Copilot has organization instructions on Business and Enterprise, for Copilot Chat on GitHub.com, code review and the cloud agent. That is four consoles, four formats and the right plan in each. - A shared rules repo, synced into each tool. A script copies one source into every file above. It works, but you are back to copies, kept in step by a script.
- One source all three agents reach. An MCP server or hooks that hand each session the rules from one place. This is what Harbor does.
Where Harbor fits #
Harbor keeps one set of rules for the team, learned from where you already decide: Slack threads, pull request reviews and docs, plus what agent sessions record. npx harborloop init installs hooks that Claude Code, Cursor and Codex already know how to run, and each session then starts with the rules that apply to this repo and this task, not the whole file. Any MCP client can reach the same rules through Harbor's MCP server, and harbor doctor checks that they are reaching the agents you think they are.
You set the gate on what gets in: Manual holds everything for a person, Hybrid (the default) adds routine rules and holds the rest, and a rule that contradicts a live one always waits for a person. For each rule, Harbor counts how often it was served and how often an answer cited it. A cite is evidence a rule was used, not proof it was followed. Harbor is in early access; the quickstart shows the setup.
Questions #
Is there one file Claude Code, Codex and Cursor all read?
Inside a repo, AGENTS.md: Codex and Cursor read it, and Claude Code reads it when there is no CLAUDE.md, or through an @AGENTS.md line in one. For rules across all your repos, no: Claude Code reads ~/.claude/CLAUDE.md, Codex reads ~/.codex/AGENTS.md, and Cursor keeps User Rules in its settings.
How do I share rules across repos in Claude Code?
Put them in ~/.claude/CLAUDE.md or ~/.claude/rules/, which load in every project on your machine. ~/.claude/CLAUDE.md can import a file kept anywhere with @~/path, without an approval prompt.
Where do global rules go in Codex?
In ~/.codex/AGENTS.md, or ~/.codex/AGENTS.override.md, which wins when it exists. Codex reads it before the project files and uses only the first non-empty file at that level.
How does a team share the same rules across Claude Code, Codex and Cursor?
Either an admin setting in each tool (a managed CLAUDE.md, Codex requirements.toml, Cursor Team Rules, Copilot organization instructions), each on its own plan, or one source every agent reaches through hooks or an MCP server, such as Harbor.