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

Keep each Cursor rule under 500 lines and split the rest by file pattern

Published November 18, 2026

Cursor’s own guidance is to keep each rule under 500 lines; past that, split it into several rules in .cursor/rules/ and make most of them apply only to matching files or when the agent judges them relevant, so an Always Apply rule holds only what every chat needs. Remember that rules never reach Tab or other non-Agent features, however short they are.

For Cursor. Vendor facts are from the pages linked below, read on November 18, 2026.

How to split a long rule

  • Count: wc -l .cursor/rules/*.mdc AGENTS.md. Anything near 500 lines is a candidate.
  • Keep one short Always Apply rule for commands and conventions every task needs.
  • Move the rest into one file per subject with globs: (Apply to Specific Files) or a clear description: (Apply Intelligently).
  • Move legacy .cursorrules lines into .cursor/rules/ or AGENTS.md.
  • Nested AGENTS.md files work too: Cursor reads them in subdirectories, and the more specific one takes precedence.
---
description: Payments webhooks
globs: services/payments/**
alwaysApply: false
---
Acknowledge with 200, then enqueue.

The numbers

MeasureValueSource
Cursor’s recommended maximum per rule500 linesCursor rules docs
Rule types4: Always Apply, Apply Intelligently, Apply to Specific Files, Apply ManuallyCursor rules docs
AGENTS.md files longer than 500 lines (Cursor reads AGENTS.md)3.3% (weighted)Harbor study, 18 Oct 2026
AGENTS.md files longer than 200 lines17.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

  • Cursor: Rules: Keep rules under 500 lines. Cursor supports AGENTS.md in the project root and subdirectories, and more specific instructions take precedence. Rules do not impact Cursor Tab or other AI features.

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. In Cursor it adds the rules that apply when the session starts and on every prompt, picked for the task, so a rule about payments does not ride along on a CSS change. 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

  • Cursor rules best practices
  • Cursor Team Rules
  • Check a Cursor rule for free
  • 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
  • Copilot code review no longer stops at 4,000 characters of instructions: the limit was removed in June 2026
  • Every answer, by agent and problem

Questions

How long should a Cursor rule be?

Under 500 lines, per Cursor’s docs. Shorter is better for an Always Apply rule, since it goes into every Agent chat.

Do Cursor rules apply to Tab completions?

No. Cursor’s FAQ says rules do not impact Cursor Tab or other AI features; they apply to Agent chats.

Is .cursorrules still supported?

Cursor treats it as legacy. Move its lines into .cursor/rules/ or AGENTS.md, which Cursor reads at the root and in subdirectories.

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