← All tools

PromptWake for Gemini CLI

Gemini CLI deletes sessions older than 30 days by default — the same horizon as Claude Code, from a different vendor, with the same silence about it. Turn it off, then keep the record somewhere that is not a directory called tmp.

How Gemini CLI loses history

general.sessionRetention deletes sessions after 30 days, and cleanup is enabled by default.

~/.gemini/tmp/<project_hash>/chats/
Retention default
maxAge "30d", cleanup enabled
Setting
general.sessionRetention in settings.json
Scope
Per project hash — a different path is a different history
Location
Under tmp, which is a statement of intent
What PromptWake captures
  • Prompts and responses from each project's session log
  • Tool executions recorded alongside the conversation
  • A copy that outlives the 30-day cleanup
  • One timeline across projects, rather than one per project hash

Do this first, before reading further or installing anything. It takes one block and removes a deadline nobody showed you:

// ~/.gemini/settings.json
{ "general": { "sessionRetention": { "enabled": false } } }

The defaults are enabled: true and maxAge: "30d", with a one-day floor that prevents very recent sessions being removed. Everything older than a month goes, and the only notice you get is the absence you eventually notice.

Two vendors, one number

Claude Code deletes transcripts after 30 days by default. Gemini CLI deletes sessions after 30 days by default. Neither shows you the setting during setup. That convergence is not coordination — it is what happens when two teams independently classify conversation logs as a cache, which is also why the Gemini directory is called tmp.

It is a reasonable call for disk and an increasingly poor one for the record, because that cache is now the only written account of why a large share of a codebase looks the way it does.

The project hash catches people too

Sessions are stored under a hash of the directory you started Gemini in. A renamed folder, a second checkout, or a symlinked path produces a different hash and an empty history, while the old sessions sit under the old one until the cleanup takes them.

What PromptWake does with Gemini specifically

The daemon reads the session logs for the projects you are capturing and stores prompt and response outside ~/.gemini. Once captured, the 30-day cleanup is irrelevant to your record — it can run, and the timeline stays.

Change the retention setting anyway. Capture starts from the day you install; the setting is what protects the weeks before that.

npx promptwake doctor     # how much is inside the deletion window
npx promptwake init .

When it matters

Deeper on where Gemini CLI keeps its history, and how to back it up without PromptWake: read the guide.