Your agent just gave three different answers to the same question in three different tools. Claude Code said the shared package needs full tests before a change ships. Cursor said it does not. Codex said nothing at all. All three read the same repository. None of them read the same rule file.
That is configuration drift, and it is not a prompt problem. It is a layout problem.
This note covers why agent configuration splits across tools and repositories, where the silent splits happen, and a three-item preflight check you can run today before your next multi-agent session.
1. Where the copies live
AI coding agents are customizable: skills, MCP servers, hooks, repo-specific context, instruction files. The trouble is where that configuration lives. Some of it sits in your home directory. Some is committed to each repository. Some is configured through the IDE. Some sits in a shared Git repository. Some is copied manually between machines.
With five developers, three repositories and three agents, you quickly get:
- Duplication: the same skill or instruction copied into multiple repositories and tool-specific folders.
- Configuration drift: one developer updates a rule, everyone else keeps an older copy.
- Fragmentation: each harness reads a different format -
.cursor/rules/*.mdc,CLAUDE.md,AGENTS.md,.github/copilot-instructions.md- and none of them reference each other.
The result is what teams call "prompt drift": two people editing the same code get two different agent suggestions, because each tool only sees its own file.
2. One source of truth
Fix the layout, not the prompt. Keep one canonical rule set per scope, and let each tool read a thin wrapper that points at it.
| Scope | Owner | Where it lives |
|---|---|---|
| Organization | security / platform | central repo, organization-wide skills and MCP configs |
| Team | frontend / backend | team folder in the same repo |
| Repository | repo maintainers |
AGENTS.md + tool wrappers at repo root |
| Personal | individual developer | home-directory config, never committed |
The tools do not even read the same kind of file. Claude Code looks for CLAUDE.md (and falls back to AGENTS.md only when no CLAUDE.md exists). Cursor reads .cursor/rules/*.mdc. Copilot reads .github/copilot-instructions.md plus organization settings. Because each harness parses its own format, a rule that is perfect in AGENTS.md but missing from .mdc is simply invisible to Cursor - not interpreted loosely, not flagged, silently skipped.
A repository should inherit configuration from its team and organization, while developers keep their own selected assets on top. The key rule: write the rule once, distribute it as thin adapters (CLAUDE.md imports AGENTS.md, Cursor .mdc mirrors the same bullets), never as independent copies, and review all four files together.
3. Three-item preflight check
Run these before an agent touches a shared repository.
First, diff the rule files. Extract the instruction blocks from AGENTS.md, CLAUDE.md and every .cursor/rules/*.mdc in the repo. If two files disagree on the same convention - return format, test requirement, naming rule - treat it as a blocker until one file wins.
Second, check for silent truncation. Some tools cap the instruction document they load (for example, a 32 KiB project-doc budget across a lookup chain). A 400-line style guide copied into every tool config can silently cut off nested package-level rules. Count lines before you commit.
Third, verify the hook path. Pre-commit and PreToolUse hooks often live in tool-specific directories. Confirm the same guard (for example, "no secret in commit message") fires under every agent you actually use, not just the one you tested. A hook that exists only under Claude Code does nothing when the same commit is made from Cursor or Codex.
3.1 Worked example: aligning three tools
Here is the minimal layout that keeps three agents in sync:
repo/
AGENTS.md # canonical rule set, written once
CLAUDE.md # one line: @AGENTS.md
.cursor/rules/repo.mdc # same bullets, copied from AGENTS.md
.github/copilot-instructions.md # same summary, no additions
The golden rule: every change starts in AGENTS.md. The wrappers (CLAUDE.md, .mdc, Copilot instructions) are regenerated from it, never edited independently. When a developer adds a new convention - for example, "every new API route needs a Zod schema" - they edit AGENTS.md, then regenerate the three wrappers in the same commit. Code review checks that all four files agree, not that one of them looks right.
This works because each agent reads its own native file and nothing else. Claude Code reads CLAUDE.md, Cursor reads .mdc, Copilot reads its instructions file. If those four files say the same thing, all three agents behave the same way. If they say different things, the agent reading the wrong file gives the wrong answer, and nobody notices until code review.
4. What this does not fix
A single source of truth stops the copies from lying to each other. It does not:
- Catch logic bugs. The agent reads the right rule and still applies it wrong.
- Replace a review pass. Faster generation means more surface area, not less.
- Remove prompt injection. An agent that can read your rules can be told by those rules what to do.
Connection is not the end of review.
What to do Monday morning
None of this requires a new vendor. Start with the repository you already share.
Pick one canonical file. Make
AGENTS.mdat the repo root the single rule set. Every convention the team expects agents to follow goes there first.Add thin wrappers.
CLAUDE.mdcontains one line (@AGENTS.md)..cursor/rules/repo.mdcmirrors the same bullets. Copilot instructions carry the same summary, no additions. Regenerate wrappers fromAGENTS.md, never edit them independently.Diff before you commit. Code review checks all four files agree. If
AGENTS.mdsays "full tests before shipping shared changes" but.mdcdoes not, the PR is blocked until they match.Run the preflight on the next agent session. Before an agent touches the repo, diff the instruction blocks, check for silent truncation, and verify the hook path under every agent the team actually uses.
Bottom line
If your agents are reading different files, they are different agents. Put the rule in one place, ship thin wrappers to each tool, diff before you ship, and review the diff with a person before it reaches production.
Sources
- ademiss, "Your AI Coding Agents Work Across Repositories. Their Configuration Doesn't," dev.to, Nov 29 2026. Primary source for the duplication/drift/fragmentation model and the organization-team-repository-personal scope layout.
- HaiAI123, "Developers use symlinks to let multiple coding agents share one rule set," Nov 25 and Nov 27 2026. Chinese-language confirmation of the AGENTS.md / CLAUDE.md / Cursor rule symlink practice and the instruction-size truncation trap.
- hqwc.cn, "Unified Agent Rules architecture: solving AI programming tool rule fragmentation," Nov 2026. Independent Chinese account of rule files bound to tools rather than projects, and the single-source-of-truth fix.
- Juejin, "Context rot vs. context drift," Nov 26 2026. Distinguishes noise buildup (rot) from out-of-sync files (drift) and reports that models silently pick one conflicting version without telling the user.
This post was written with AI assistance. The author is responsible for its content.
Top comments (0)