Answers
Gemini CLI remembers between sessions by editing GEMINI.md files, in three places
Published
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 showto see everything loaded, and/memory reloadafter 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
| Measure | Value | Source |
|---|---|---|
| Memory tiers | 3: repository GEMINI.md, private project folder, ~/.gemini/GEMINI.md | Gemini CLI memory docs |
| Tiers a teammate sees | 1, the committed repository GEMINI.md | Gemini CLI memory docs |
| Gemini CLI replaced by Antigravity CLI | 18 June 2026, unpaid and Google One accounts | Gemini 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.