Skip to content
groundedby
Waitlist

Gemini CLI

Where Gemini CLI stores your session history

Gemini CLI saves sessions as JSONL files in ~/.gemini/tmp/<project>/chats and deletes them after 30 days by default. How to find, resume, share and keep them.

Updated October 29, 2026 // Markdown

Quick factsas of October 2026 (v0.66.0)
Made by
Google
History lives in
  • macOS / Linux~/.gemini/tmp/<project-id>/chats/session-<date>-<id>.jsonl
  • WindowsC:\Users\<user>\.gemini\tmp\<project-id>\chats\
Format
JSONL
Kept for
30 days by default (general.sessionRetention.maxAge)
Resume
gemini --resume, /resume
Cloud copy
Local only

Gemini CLI saves every session automatically, per project, and cleans them up after 30 days unless you change it.

Where the files are

~/.gemini/
├── projects.json                  # project folder -> project id
└── tmp/
    └── my-app/                    # project id
        └── chats/
            ├── session-2026-10-29T09-14-ab12cd34.jsonl
            └── checkpoint-<tag>.json    # saved with /chat save

The project id is the project folder's name, lowercased and slugified, with -1, -2 added when two projects share a name. Older versions used a hash of the path; those folders are migrated automatically. Some documentation still describes the hash.

On Windows the tree is under C:\Users\<user>\.gemini. GEMINI_CLI_HOME moves it.

What is inside

Each file opens with session details (sessionId, startTime, lastUpdated, summary), followed by messages with id, timestamp, type and content. Model messages add toolCalls, thoughts, model and tokens.

Keep sessions longer

In ~/.gemini/settings.json:

{
  "general": {
    "sessionRetention": { "enabled": true, "maxAge": "365d" }
  }
}

maxCount caps the number of sessions instead; minRetention (default one day) protects recent ones.

Resume, share and delete

gemini --resume              # the latest session
gemini --resume 3            # by index or session id
gemini --list-sessions
gemini --delete-session <id>

Inside the CLI:

  • /resume opens a session browser (x deletes the selected one).
  • /chat save <tag>, /chat list, /chat resume <tag>, /chat delete <tag> manage named checkpoints.
  • /chat share file.md or file.json exports the conversation.
  • /quit --delete leaves and deletes the current session.

Privacy notes

Sessions are stored only on your machine. Prompts are sent to Google's API under the terms shown by /privacy.

The groundedby evaluator does not read Gemini CLI sessions yet.

Questions

Where does Gemini CLI keep chat history?+

In ~/.gemini/tmp/<project-id>/chats, one session-<date>-<id>.jsonl file per session. The project id is your project folder's name, lowercased and slugified; ~/.gemini/projects.json maps folders to ids.

How long does Gemini CLI keep sessions?+

30 days by default. The general.sessionRetention setting controls it - maxAge (default 30d), maxCount (default unlimited) and enabled (default true).

How do I resume a Gemini CLI session?+

gemini --resume resumes the latest, or pass an index or session id. gemini --list-sessions lists them, and /resume opens a browser inside the CLI.

Sources

  1. Gemini CLI docs, session management
  2. Gemini CLI source, storage paths

Waitlist

Your sessions, your call.

We are building an opt-in marketplace where developers license redacted sessions they pick, one by one. Join to hear first.

Your email and the side you picked. Nothing else. Privacy