Dekita

AI coding agents work across repositories. Their configuration does not.

ai agents devtools config

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:

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:

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.

  1. Pick one canonical file. Make AGENTS.md at the repo root the single rule set. Every convention the team expects agents to follow goes there first.
  1. Add thin wrappers. CLAUDE.md contains one line (@AGENTS.md). .cursor/rules/repo.mdc mirrors the same bullets. Copilot instructions carry the same summary, no additions. Regenerate wrappers from AGENTS.md, never edit them independently.
  1. Diff before you commit. Code review checks all four files agree. If AGENTS.md says "full tests before shipping shared changes" but .mdc does not, the PR is blocked until they match.
  1. 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

This post was written with AI assistance. The author is responsible for its content.