Answers
Gemini CLI reads AGENTS.md only if context.fileName lists it; Antigravity CLI reads it by default
Published
Gemini CLI reads only GEMINI.md by default; to make it read the AGENTS.md your Codex, Cursor and Copilot teammates use, set context.fileName in settings.json to a list such as ["AGENTS.md", "GEMINI.md"]. Antigravity CLI, which replaced Gemini CLI for unpaid and Google One accounts on 18 June 2026, reads AGENTS.md and GEMINI.md with no setting.
For Gemini CLI and Antigravity CLI. Vendor facts are from the pages linked below, read on November 18, 2026.
One file for every agent
- Keep the shared rules in AGENTS.md, the one file Codex, Cursor, Copilot and Antigravity all read.
- In Gemini CLI, add
context.fileNameto~/.gemini/settings.jsonor the project’s.gemini/settings.json. - Or import it: a GEMINI.md line
@./AGENTS.mdpulls the file in with Gemini CLI’s import syntax. - Run
/memory showto see the concatenated context, and/memory reloadafter editing. - In Antigravity, both files are combined into the prompt with no stated precedence, so do not keep conflicting copies.
{
"context": {
"fileName": ["AGENTS.md", "GEMINI.md"]
}
}The numbers
| Measure | Value | Source |
|---|---|---|
| Public AGENTS.md files on GitHub | 1,142,784 | Harbor study, 18 Oct 2026 |
| Public CLAUDE.md files, for comparison | 839,680 | Harbor study, 18 Oct 2026 |
| Gemini CLI replaced by Antigravity CLI | 18 June 2026, unpaid and Google One accounts | Gemini CLI 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
- Gemini CLI: GEMINI.md files: context.fileName in settings.json accepts one name or a list, for example ["AGENTS.md", "CONTEXT.md", "GEMINI.md"]. /memory show displays the concatenated memory; /memory reload re-scans the files.
- Antigravity: Rules: Workspace rules are AGENTS.md, GEMINI.md or .agents/rules/*.md; AGENTS.md and GEMINI.md take no frontmatter and are always on. Discovered rules are combined into the prompt.
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 vs CLAUDE.md, every agent
- Keep rule files in sync
- Share CLAUDE.md rules across repos with ~/.claude/rules, a symlinked .claude/rules, or a managed CLAUDE.md
- Codex shares instructions across repos only through ~/.codex/AGENTS.md, one person at a time
- Copilot organization instructions reach every repo, but only on GitHub.com and in code review
- Share Windsurf rules across repos with ~/.devin/rules, and with other agents through AGENTS.md
- Every answer, by agent and problem
Questions
Does Gemini CLI read AGENTS.md?
Not by default. It reads GEMINI.md from ~/.gemini and from your workspace folders and their parents. Set context.fileName to a list such as ["AGENTS.md", "GEMINI.md"] to read AGENTS.md too.
Does Antigravity CLI read AGENTS.md?
Yes. AGENTS.md and GEMINI.md in the folder you start agy in, or a parent up to the repository root, are always-on rules.
Should I keep GEMINI.md or move to AGENTS.md?
Keep shared rules in AGENTS.md, since every major coding agent reads it, and leave GEMINI.md for anything only Gemini needs, or import AGENTS.md from it.