When personal, repository and organization GitHub Copilot instructions conflict, which takes precedence, and why can the losing rule still show up?
answer
- three levels of ownership
- the individual ranks first
- path, then repository, then agent
- every relevant set is sent
- editor docs: do not rely on order
basics
~10 sGitHub ranks personal instructions highest, then repository (path-specific, repository-wide, agent), then organization. All relevant sets are still sent to Copilot, so a lower-ranked rule can still influence the answer.
solid answer
~40 sGitHub documents an order of precedence: **personal** instructions first, then **repository** instructions, which run path-specific `.instructions.md`, then `.github/copilot-instructions.md`, then agent instructions such as `AGENTS.md`, and **organization** instructions last. The same page adds that all relevant sets are still provided to Copilot, so precedence is a priority hint to the model, not a filter that deletes the losing rule; with non-deterministic output, a contradiction can surface either way. VS Code's docs go further: sources are additive, merge behaviour can differ by harness, and you should not depend on order to resolve conflicts. Copilot CLI defines no general precedence. The fix is to remove the contradiction at its source.
go deeper
Recall the three owners of Copilot instructions, personal, repository and organization, and that personal ranks highest while organization ranks last.
Explain the full order including path-specific over repository-wide over agent files, and that every relevant set is still sent with the request.
Show you diagnose a conflict with References and fresh chats, fix contradictions at their source, and do not rely on order where VS Code and Copilot CLI define none.
Decide what belongs at organization, repository and personal level so the layers do not fight, and which requirements need enforcement rather than ranked guidance.
## Three owners, one request A single Copilot request can carry instructions written by three different owners: - **Personal instructions**: an individual's preferences, such as answer language or style. On the GitHub website they are supported only for Copilot Chat on GitHub.com; Copilot CLI reads personal files from `~/.copilot/copilot-instructions.md` and `~/.copilot/instructions/**/*.instructions.md`. - **Repository instructions**: the files in the repository, written by the team that owns it. - **Organization instructions**: set by organization owners in the organization's Copilot settings, available with Copilot Business or Copilot Enterprise. They apply to all members, whichever organization provides their seat. They are supported for Copilot Chat, code review and the cloud agent on GitHub.com; VS Code discovers them when `github.copilot.chat.organizationInstructions.enabled` is on, its default. ## The documented order GitHub's page on customizing responses lists the complete order, highest first: 1. **Personal** instructions 2. **Repository** custom instructions: - **path-specific** instructions in any applicable `.github/instructions/**/*.instructions.md` file - **repository-wide** instructions in `.github/copilot-instructions.md` - **agent** instructions, for example in an `AGENTS.md` file 3. **Organization** instructions The same note immediately qualifies it: **all sets of relevant instructions are provided to Copilot**. Nothing is removed from the prompt because a higher-ranked set exists. ## Why the losing rule still shows up Precedence is guidance about which rule should win, given to a model that sees every rule. Two consequences follow: - If an organization instruction says to use one HTTP client and a personal instruction says another, both texts reach the model. The answer should follow the personal one, but the docs warn that Copilot may not follow custom instructions in exactly the same way every time. - Different surfaces build different sets. The table below shows why the same conflict can look resolved in one place and not in another. | Surface | How conflicts are described | |---|---| | GitHub.com features | The order above; all relevant sets are still sent | | VS Code | Sources are additive; do not depend on order, because merge behaviour can differ by harness | | Copilot CLI | Combines files, removes identical duplicates, defines no general precedence | ## Resolving a conflict in practice GitHub and VS Code give the same advice: avoid conflicting sets rather than leaning on precedence. A workable sequence, following VS Code's guidance: 1. Reproduce with a small change in a new chat that the conflicting rules affect. 2. Expand **References** on the response to see which instruction files were included; in VS Code, use the Agent Customizations editor and Agent Debug Logs to see what was discovered. 3. Fix the contradiction at its source: narrow or remove the personal rule, and align repository and path-specific files with the organization requirement. 4. Repeat the task in another new chat and compare. On GitHub.com you can also temporarily disable repository instructions to check whether they cause a quality problem; for code review that is the repository setting **Use custom instructions when reviewing pull requests**. ## Reading the order correctly Two misreadings are common. The first is that organization instructions, being centrally managed, override everyone: the documented order puts them **last**. The second is that a path-specific file replaces the repository-wide file: when both apply, both are used, and the path-specific one merely ranks higher if they disagree. Instructions are guidance either way; anything that must never happen needs enforcement elsewhere, such as checks in the pipeline. ## A worked conflict An organization instruction says "always respond in English". A developer's personal instruction on GitHub.com says "always respond in Portuguese". Asked a question in Copilot Chat on GitHub.com, Copilot should answer in Portuguese, because personal instructions rank highest. The English instruction is still in the prompt, so an occasional English answer is not a bug in precedence; it is the model weighing two contradictory texts. Now move the same developer to Copilot cloud agent. Personal instructions on the GitHub website are supported only for Copilot Chat, so the cloud agent sees the organization instruction and the repository files but not the personal one. The "conflict" disappears there, and the developer may wonder why the agent writes English pull request descriptions. Knowing which surface supports which instruction type explains both outcomes.
- Within repository instructions, a path-specific file and copilot-instructions.md disagree about test naming. Which should win, and is the other one dropped?GitHub's order ranks path-specific instructions in an applicable .instructions.md file above the repository-wide file, so the path-specific rule should win. Neither is dropped: when a path-specific file matches and a repository-wide file exists, both are used, so the contradiction still reaches the model.
- An organization owner expects an organization instruction to override every repository's own files. What do you tell them?In GitHub's documented order, organization instructions rank last, below personal and repository instructions. They are still sent with every relevant request on supported surfaces, but a conflicting repository or personal rule ranks higher. If the requirement is non-negotiable, align the repositories with it or enforce it outside instructions.
Think of sticky notes from you, your team and head office stuck to the same page. Your note is meant to win, but every note stays on the page and the reader still sees them all, so a contradiction can still sway what gets done.
- Organization instructions override repository and personal instructions.
- Lower-ranked instruction sets are dropped from the request when a conflict exists.
- A matching path-specific file replaces .github/copilot-instructions.md for that request.
- VS Code guarantees the same precedence order across every harness.
- Copilot CLI ranks AGENTS.md above copilot-instructions.md.