google-gemini / google-gemini/gemini-cli
Session information loss on upgrade from 0.45.x to 0.46
- Dominant language
- TypeScript
- Stars
- 107k
- Forks
- 14.6k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 45
Description
### What happened?
After updating gemini-cli from 0.45.1 to 0.46, and running `gemini --resume` the session behaved as if it was new, with no prior history.
- I had a session in a project that I was using.
- I have enabled session persistence (no cleanup of old sessions) after previous session losses:
- Enable Session Cleanup *false
- Keep chat history: 365d
- My package version is set to ` "@google/gemini-cli": "latest"`
- On session resume, `gemini` failed to self-update from 0.45.1 to 0.46 (this is expected, as I manage the package from `~/.local/`.
- I did a `/quit and then ran `npm update`, and then ran gemini with --resume.
- The session behaved as if it was brand new, instead of resuming:
```
x4l:~/workspace/nginx$ GOOGLE_CLOUD_PROJECT=XXXXXXXX gemini --list-sessions
Available sessions for this project (1):
1. Request a summary of the conversation history (9 minutes ago) [b2e9ca8f-0c5a-496b-bc47-6d59f34497e8]
Loaded cached credentials.
x4l:~/workspace/nginx$ grep -lr b2e9ca8f-0c5a-496b-bc47-6d59f34497e8 ~/.gemini/tmp/nginx
~/.gemini/tmp/nginx/logs.json
~/.gemini/tmp/nginx/chats/session-2026-06-13T05-26-b2e9ca8f.jsonl
~/.gemini/tmp/nginx/chats/session-2026-06-13T05-20-b2e9ca8f.jsonl
~/.gemini/tmp/nginx/chats/session-2026-06-13T05-18-b2e9ca8f.jsonl
~/.gemini/tmp/nginx/chats/session-2026-06-13T04-47-b2e9ca8f.jsonl
~/.gemini/tmp/nginx/chats/session-2026-06-07T08-41-b2e9ca8f.jsonl
~/.gemini/tmp/nginx/chats/session-2026-06-13T04-49-b2e9ca8f.jsonl
~/.gemini/tmp/nginx/chats/session-2026-06-08T18-56-b2e9ca8f.jsonl
~/.gemini/tmp/nginx/chats/session-2026-06-13T05-19-b2e9ca8f.jsonl
```
Session is blank, and trying to get the conversation history shows:
```
> give me a brief description of the conversation history till now
✦ There is no prior conversation history in this session. We have just started, and I am ready to help you manage or modify the Nginx configuration files in your workspace.
```
### What did you expect to happen?
I expected `gemini --resume` to resume the session I was working on.
### Client information
Client Information
Run `gemini` to enter the interactive CLI, then run the `/about` command.
```console
> /about
│ About Gemini CLI │
│ │
│ CLI Version 0.46.0 │
│ Git Commit 85b0c55c1 │
│ Model Auto (Gemini 2.5) │
│ Sandbox no sandbox │
│ OS linux │
│ Auth Method Signed in with Google (XXXXXXXX) │
│ Tier Gemini Code Assist Enterprise │
│ GCP Project XXXXXXXXXXX```
### Login information
I log in with my google account.
### Anything else we need to know?
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.