Answers
Copilot code review no longer stops at 4,000 characters of instructions: the limit was removed in June 2026
Published
There is no character limit on copilot-instructions.md or *.instructions.md for Copilot code review any more: GitHub removed the 4,000-character cut on 12 June 2026. Advice written before then, which says code review reads only the first 4,000 characters, is out of date. Length still has a cost, because every relevant instruction file reaches the model at once and competes with the task.
For GitHub Copilot. Vendor facts are from the pages linked below, read on November 18, 2026.
What to do with a long instructions file
- Keep the repo-wide
.github/copilot-instructions.mdto what every task needs. GitHub’s own generated-instructions prompt asks for no more than 2 pages. - Move path-specific rules into
.github/instructions/*.instructions.mdwith anapplyToglob, so they load only for matching files. - Delete one side of any conflict: personal, repository and organization instructions are all sent together.
- Test a change in the same pull request: code review reads instructions from the PR’s head branch, so edit the file and request a new review.
---
applyTo: "services/payments/**"
---
Webhook handlers acknowledge with 200, then enqueue.The numbers
| Measure | Value | Source |
|---|---|---|
| Old code review limit on instruction files | 4,000 characters, removed 12 June 2026 | GitHub changelog |
| GitHub’s length target for generated instructions | No longer than 2 pages | GitHub repository instructions docs |
| AGENTS.md files longer than 200 lines (Copilot reads AGENTS.md too) | 17.8% (weighted) | Harbor study, 18 Oct 2026 |
Study figures are weighted estimates from 1,935 CLAUDE.md and 1,970 AGENTS.md files sampled from public GitHub repositories on 18 October 2026, with GitHub's own counts for the totals. Every figure is in the study's CSV, and the method is in the study.
What the docs say
- GitHub changelog, 12 June 2026: Previously, Copilot code review would stop reading copilot-instructions.md and *.instructions.md files under .github once a file reached 4000 characters. That limit has now been removed.
- GitHub: Adding repository custom instructions: Personal instructions take the highest priority, then repository, then organization, but all sets of relevant instructions are provided to Copilot. Avoid conflicting sets where possible.
Where Harbor fits
Harbor connects Claude Code, Codex, Cursor and GitHub Copilot (the CLI and VS Code agent mode; the cloud agent is not supported yet) through hooks and an MCP server. It serves Copilot only the team rules that apply to the task instead of one long file, and its GitHub App can review pull requests against CLAUDE.md, AGENTS.md and the team’s rules beside Copilot’s own review. Each rule shows how often it was served and how often an answer cited it. A citation is evidence a rule was used, not proof it was obeyed.
Read next
- How to write copilot-instructions.md
- Why Copilot ignores its instructions
- Share Copilot instructions across repos
- Codex reads 32 KiB of AGENTS.md and cuts the rest: raise project_doc_max_bytes or trim
- Antigravity truncates each rule file at 24,000 bytes and caps always-on rules at 20,000 tokens
- Keep each Cursor rule under 500 lines and split the rest by file pattern
- Every answer, by agent and problem
Questions
Does Copilot code review only read the first 4,000 characters of copilot-instructions.md?
Not since 12 June 2026. GitHub’s changelog says the 4,000-character limit on copilot-instructions.md and *.instructions.md files for code review has been removed.
How long should copilot-instructions.md be?
GitHub gives no hard limit now. Its prompt for generating instructions asks for no more than 2 pages, and anything specific to some paths belongs in a .instructions.md file with applyTo.
Do organization instructions count toward the length?
They are sent alongside repository and personal instructions on the surfaces that support them, so the model weighs all of them together. There is no shared character budget documented.