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

Antigravity truncates each rule file at 24,000 bytes and caps always-on rules at 20,000 tokens

Published November 18, 2026

Antigravity truncates any rule file above 24,000 bytes, counted after includes are expanded, and global plus always_on rules share a 20,000-token budget; past it, the largest files are reduced to pointers the agent reads only on demand. A long AGENTS.md written for Codex’s 32 KiB limit can therefore lose its end in Antigravity.

For Gemini CLI and Antigravity CLI. Vendor facts are from the pages linked below, read on November 18, 2026.

How to stay under it

  • Measure with wc -c AGENTS.md GEMINI.md, and count what your @[label](path) includes add, since the limit applies after they are inlined.
  • Split by subject into .agents/rules/*.md, each with a trigger:. A glob or model_decision rule loads its full text only when the task matches.
  • Keep the always-on set small: AGENTS.md, GEMINI.md, global files and always_on rules all draw on the same 20,000 tokens.
  • Put the rules that matter most at the top of each file, since truncation removes the end.
---
trigger: model_decision
description: Database migrations and schema changes
---
Every migration gets a down step.

The numbers

MeasureValueSource
Rule file truncation point24,000 bytes, after includesAntigravity rules docs
Global and always_on rules20,000 tokens together, separate from skills and MCPAntigravity rules docs
Public AGENTS.md files over 24 KiB51,840 (4.5% of all)Harbor study, 18 Oct 2026
Codex’s default limit, for comparison32 KiBCodex AGENTS.md docs

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

  • Antigravity: Rules: Each rule file is truncated above 24,000 bytes after includes are expanded. Global and always_on rules share a 20,000-token aggregate budget; past it, the largest files are reduced to pointers the agent can read on demand.

Where Harbor fits

Harbor has no hooks for this agent. Its MCP server can be added to any MCP client, but then the agent has to decide to call it, which is the same weakness as a file it has to choose to open. If this is your main agent, the free fixes above are the answer today.

Read next

  • Why Antigravity CLI skips AGENTS.md
  • AGENTS.md too long for Codex
  • The study behind the numbers
  • Copilot code review no longer stops at 4,000 characters of instructions: the limit was removed in June 2026
  • Keep each Cursor rule under 500 lines and split the rest by file pattern
  • Every answer, by agent and problem

Questions

Is there a size limit on AGENTS.md in Antigravity?

Yes. Each rule file, AGENTS.md and GEMINI.md included, is truncated above 24,000 bytes after includes are expanded, and global plus always_on rules share a 20,000-token budget.

What happens when Antigravity rules go over the token budget?

The largest files are reduced to pointers that the agent can read on demand, so their text is no longer in every prompt.

Did Gemini CLI have a GEMINI.md size limit?

Its GEMINI.md page states none. It concatenated every file found and sent them with each prompt.

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