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

Gemini CLI remembers between sessions by editing GEMINI.md files, in three places

Published November 18, 2026

Gemini CLI remembers between sessions by editing Markdown memory files directly, and everything it saves is loaded into future sessions: shared project facts go in the repository’s GEMINI.md, private project notes in a per-project memory folder, and personal preferences in ~/.gemini/GEMINI.md. Only the first of the three reaches a teammate, and only once someone commits it.

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

Make it remember the right thing, in the right place

  • Ask it to remember something and say where: "remember for this repo" belongs in the repo’s GEMINI.md, a personal habit in ~/.gemini/GEMINI.md.
  • Review the diff before committing a GEMINI.md it edited: it is now the team’s instruction file.
  • Run /memory show to see everything loaded, and /memory reload after editing a file by hand.
  • Do not repeat a fact across tiers; Google’s page says to keep durable instructions concise.
  • On Antigravity CLI, keep durable rules in AGENTS.md or GEMINI.md, which it reads as always-on rules.

The numbers

MeasureValueSource
Memory tiers3: repository GEMINI.md, private project folder, ~/.gemini/GEMINI.mdGemini CLI memory docs
Tiers a teammate sees1, the committed repository GEMINI.mdGemini CLI memory docs
Gemini CLI replaced by Antigravity CLI18 June 2026, unpaid and Google One accountsGemini CLI docs

What the docs say

  • Gemini CLI: memory: Gemini CLI persists durable facts, user preferences and project details by editing Markdown memory files directly, and they are automatically included in the hierarchical context for all future sessions.
  • Gemini CLI: GEMINI.md files: The CLI concatenates every GEMINI.md it finds and sends them with every prompt. /memory show displays the result.

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

  • Claude Code memory vs Codex, Cursor and Copilot
  • Do coding agents need memory?
  • Gemini CLI and AGENTS.md
  • Antigravity CLI skips AGENTS.md in subfolders and drops rule files without a valid trigger
  • Antigravity truncates each rule file at 24,000 bytes and caps always-on rules at 20,000 tokens
  • Every answer, by agent and problem

Questions

Does Gemini CLI have memory between sessions?

Yes. It edits Markdown memory files, and what it writes is loaded into every future session: the repo’s GEMINI.md, a private per-project folder, or ~/.gemini/GEMINI.md.

Is Gemini CLI memory shared with my team?

Only what it writes to the repository’s GEMINI.md, and only after that change is committed and pulled. Private project notes and ~/.gemini/GEMINI.md stay on your machine.

How do I see what Gemini CLI remembers?

Run /memory show, which displays the full concatenated content of the hierarchical memory. /memory reload re-reads the files after you edit them.

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