Skip to content
How it learnsFrom coding sessions, reviews, Slack and docs.Only what fitsEach session gets the few rules its task needs.Pull request reviewEvery PR checked against your team’s rules.Keep it trueA gate, conflicts, disputes and stale rules, handled.HandoffsCarry the work to another session or a teammate.SecurityWhat it sends, what it changes and how to leave.
Engineering teamsOne agent or several: what one person learns, every session uses.PR review onlyInstall the GitHub App. Nothing on anyone’s machine.Teams that mix agentsClaude Code, Cursor, Codex and Copilot, the same rules.On your ownYour corrections follow you across repos, machines and agents.Book a call30 minutes with Roei, if you want a hand. Never required.
DocsPricingSign in
Connect your agents →
For teamsOn your ownPR review onlyHow it learnsOnly what fitsPull request reviewKeep it trueSecurityDocsPricingSign inConnect your agents →
Home/Answers

Answers

Ignores its rule file

  • HTML comments in CLAUDE.md
  • "Read AGENTS.md" does not import
  • Antigravity ignores AGENTS.md
  • Windsurf ignores rules

Rule file too long

  • AGENTS.md too long for Codex
  • Antigravity rule size limit
  • Copilot instructions length
  • Cursor rules too long

Rules drift from the code

  • CLAUDE.md and AGENTS.md drift
  • Directory trees in rule files

Share rules across repos and agents

  • Share CLAUDE.md across repos
  • Share AGENTS.md in Codex
  • Copilot org instructions
  • Gemini CLI and AGENTS.md
  • Share Windsurf rules

Memory between sessions

  • Gemini CLI memory

Answers

Copilot code review no longer stops at 4,000 characters of instructions: the limit was removed in June 2026

Published November 18, 2026

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.md to 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.md with an applyTo glob, 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

MeasureValueSource
Old code review limit on instruction files4,000 characters, removed 12 June 2026GitHub changelog
GitHub’s length target for generated instructionsNo longer than 2 pagesGitHub 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.

Your team’s rules, in every agent, checked on every PR.

Harbor is shared memory for your team’s Claude Code, Cursor, Codex and Copilot. Free for you and one teammate. No card. No end date.

Start free →

Product

  • How it learns
  • Only what fits
  • Pull request review
  • Keep it true
  • Handoffs
  • The result
  • Security
  • For coding agents
  • Pricing

Developers

  • Docs
  • Quickstart
  • Install
  • CLI
  • MCP server
  • Served and cited
  • Rule-file checker
  • Blog

Guides

  • Why Claude ignores CLAUDE.md
  • AGENTS.md vs CLAUDE.md
  • Share Claude Code memory with a team
  • Why Codex ignores AGENTS.md
  • Why Cursor ignores rules
  • Copilot instructions vs AGENTS.md
  • Shared memory across agents
  • Copilot Memory and Dreaming

Compare

  • All comparisons
  • vs Mem0
  • vs Zep
  • vs Unblocked
  • vs ByteRover
  • vs Cognee
  • vs Hindsight
  • vs OpenViking
  • vs Supermemory
  • vs Glen
  • vs MemPalace
  • vs Sentra
  • vs Trail-code

Company

  • Questions
  • Contact
  • X
  • LinkedIn
  • Privacy Policy
  • Terms of Service
  • Data Processing Agreement
  • Refund Policy
© 2026 HarborConnect your agents