31 tools· updated nov 2026

Gemini CLI resume: --resume, the last session, session ID, /resume, and where sessions live

Marek.

  • gemini-cli
  • coding-agents
  • agent-ops

To resume a session in Gemini CLI, run gemini --resume or gemini -r. With no value it loads the latest session of the current project. Add an index from gemini --list-sessions or a full session UUID to load one session. Inside a running session, /resume opens a session browser. Gemini CLI saves every session on its own. This post is for Claude Code users who now open Gemini CLI. I do not run Gemini CLI. It is not installed on my machine. Everything here comes from the docs and the v0.68.0 source, read on 12 November 2026.

gemini --resume                 # latest session in this project
gemini --list-sessions          # numbered list with session IDs
gemini --resume 3               # number 3 from that list
gemini --resume a1b2c3d4-e5f6-7890-abcd-ef1234567890
gemini -r latest "Check for type errors"

The commands come from the docs. I did not run them.

  • Latest. gemini --resume with no value. The code turns an empty value into latest.
  • One session. --resume takes an index or a full UUID. The numbers come from --list-sessions.
  • Inside. /resume opens the Session Browser. /chat is an alias.
  • Per project. Sessions sit under ~/.gemini/tmp/, one folder per project. Resume from the same folder.
  • How I know. Docs and code only. No session of my own.

How Claude Code does this, with six entry points, is in claude --resume.

Per the v0.68.0 README, free and Google AI Pro or Ultra users moved to Antigravity CLI on 18 June 2026. Gemini CLI now targets Gemini Code Assist Standard and Enterprise licenses.

How do I resume the last session in Gemini CLI?

Run gemini --resume in the project folder. Gemini CLI loads the most recent session of that project with its full history. gemini -r and gemini --resume latest do the same. The session management page says the bare flag "immediately loads the most recent session."

In the source, "most recent" is precise. In sessionUtils.ts the latest branch sorts sessions by startTime and takes the last one. So it is the session you started last, not the one you touched last. An older session you reopened yesterday is not latest, as I read the code. Load that one by index or ID.

The code also hides sessions with no resumable content, such as command-only runs, plus subagent sessions.

How do I resume a previous session by ID or index?

Run gemini --list-sessions first. Gemini CLI prints a numbered list for the current project with a title, an age and the session ID in brackets. Then run gemini --resume 2 for number 2, or pass the full UUID. In findSession an exact UUID match is tried first, then the index.

The numbering runs oldest first. The newest session gets the highest number. The docs example shows eight characters in the brackets. In v0.68.0 sessions.ts prints the full ID. I found no prefix match in findSession, so copy the whole UUID.

Indexes can move. Retention deletes sessions older than 30 days by default. When number 1 goes, I read the code as shifting every number down by one. In a script, resume by UUID.

A bad value fails with "Invalid session identifier" and a hint to run --list-sessions. The check in config.ts calls --resume, --session-id and --session-file "mutually exclusive". --session-id starts a new session with a UUID you choose. It does not resume.

The CLI reference shows gemini -r latest "query" as a way to continue the latest session with a new prompt. In a terminal that opens the interactive UI. For scripts, add -p. Exit codes and the case with no saved session are in Gemini CLI headless.

How do I use /resume inside Gemini CLI?

Type /resume in a running session. Gemini CLI opens the Session Browser with the saved sessions of this project. Each row shows the date, the message count and the first prompt. Press / to search by ID or content. Enter resumes the selected session. x deletes it.

In v0.68.0 resumeCommand.ts and chatCommand.ts both open the sessionBrowser dialog. In the current docs both names lead to one menu.

What is the difference between /resume and /chat save?

Gemini CLI keeps two separate stores. Every conversation is saved on its own as a session. /resume with no subcommand browses those. /chat save with a tag writes a named copy of the current conversation, a manual checkpoint. /resume save is the same command. /resume resume with the tag loads that copy back.

Typed out, /resume list does not list your sessions, as I read the code. Its description there is "List saved manual conversation checkpoints". The completion menu is different. Its list entry under "auto" opens the session browser.

Files are a third thing. /restore rolls back project files from a snapshot taken before a tool edit. That one is in Gemini CLI checkpointing.

Where does Gemini CLI store sessions?

Per the docs, sessions live in ~/.gemini/tmp/<project_hash>/chats/. Each project gets its own folder. A session file holds your prompts, the replies, tool calls with their output, token counts and reasoning summaries when there are any.

The v0.68.0 code names that folder differently. storage.ts takes a short ID from a project registry, projects.json. It moves the old hash folder to that name. A comment in sessionUtils.ts gives the file name as session-<TIMESTAMP>-<ID_SLICE(0,8)>.jsonl.

Retention is on by default with a 30-day limit, set under general.sessionRetention in settings.json. The keys are enabled, maxAge, maxCount and minRetention. To delete one session, run gemini --delete-session 2 or press x in the browser.

How does Gemini CLI resume compare with Claude Code, Codex, opencode and Copilot CLI?

Gemini CLI puts both jobs on one flag. --resume with no value is the latest session. With a value it is one chosen session. Claude Code, opencode and Copilot CLI split those jobs between --continue and a second flag. Codex uses a subcommand, codex resume. The trap for Claude Code users: bare gemini --resume opens no picker.

TaskGemini CLI 0.68.0Claude CodeCodexopencodeCopilot CLI
Latest heregemini --resumeclaude --continuecodex resume --lastopencode --continuecopilot --continue, falls back to any folder
One session--resume <index or uuid>claude --resume <id>codex resume <id>opencode --session <id>copilot --resume=<id>
Pick from a list/resume insideclaude --resume, /resumecodex resume/sessionscopilot --resume, /resume

The other columns come from my posts on codex resume, opencode resume and Copilot CLI resume.

Frequently asked questions

Does Gemini CLI save sessions automatically?

Yes. Per the docs, session history "is recorded automatically as you interact with the model." There is no save step. /chat save is only for named checkpoints.

Why does Gemini CLI say "No previous sessions found for this project"?

Gemini CLI looks only in the current project's folder. Start it from the folder where the session ran. Command-only runs are skipped. Sessions older than 30 days may be gone.

Can I resume a Gemini CLI session from another folder?

Not per the docs. Gemini CLI sessions are project-specific. For saved chats the commands reference says you "must run the Gemini CLI from that project's directory." I found no flag for a lookup across projects.

Did you test this?

No. Gemini CLI is not installed on my machine. I read the docs and the v0.68.0 source on 12 November 2026. I did not check Antigravity CLI.

The verdict

For Claude Code users, gemini --resume with no value loads the latest session. It shows no picker. Use /resume for the list. Check --list-sessions before you pass a number. In scripts, pass the UUID. I have not run any of this.

Sources, read on 12 November 2026: the Gemini CLI session management, CLI reference, commands reference and checkpointing pages. Code from google-gemini/gemini-cli at tag v0.68.0: config.ts, sessionUtils.ts and sessions.ts in packages/cli/src/, resumeCommand.ts and chatCommand.ts in packages/cli/src/ui/commands/, plus storage.ts in packages/core/src/config/.