Gemini CLI saves every session automatically and can resume any of them, but it also deletes them after 30 days unless you change a setting. Checked against the Gemini CLI docs as of September 2026 (v0.61.0).
Resuming
gemini --resume # the latest session (short: -r)
gemini --resume 1 # by index from the list
gemini --resume <uuid> # a specific session
gemini --list-sessions # see what's thereInside the CLI, /resume opens a session browser where you can search, preview, and press x to delete.
Where sessions are stored
Sessions save automatically to:
~/.gemini/tmp/<project_hash>/chats/They're scoped to the project you started in. Named saves (below) live in ~/.gemini/tmp/<project_hash>/ too.
Why sessions disappear
Session retention is on by default:
{
"general": {
"sessionRetention": { "enabled": true, "maxAge": "30d" }
}
}Sessions older than 30 days are deleted, along with their plans, tool output and logs. To keep them longer, raise maxAge in your Gemini settings, or set enabled to false. There's also maxCount (unset, so unlimited, by default) and a minRetention floor of one day.
Saving, naming and exporting chats
/chat is now an alias of /resume, with these subcommands:
| Command | What it does |
|---|---|
/chat save <tag> | Save the current chat under a name |
/chat resume <tag> | Go back to a named chat (/chat load works too) |
/chat list | List named chats |
/chat delete <tag> | Delete one |
/chat share file.md | Export as Markdown (or .json for JSON) |
Checkpoints are separate
Checkpointing snapshots your files before edits so /restore can roll them back. It's off by default; turn it on with "general": {"checkpointing": {"enabled": true}}. The old --checkpointing flag was removed in 0.11.0.
If you also use Claude Code, it has the same 30-day cleanup: see why Claude Code sessions disappear. Shabash keeps and organizes Claude Code sessions today, with other agents on the roadmap.