Feature Request: Pause and Resume Sessions
What would you like to be added?
A mechanism to pause the current Gemini CLI session and resume it later, even after closing the terminal or rebooting the system.
This feature would save the entire conversation history and context. Resuming the session could be handled via a command-line flag, for example gemini --resume or gemini -r.
Why is this needed?
This feature is essential for making the Gemini CLI a practical tool for real-world development workflows for several reasons:
-
Continuing Long-Running Tasks: For complex problems that take more than a single session to solve, it's currently impossible to continue the same conversation. The user has to start a new session and manually paste in all the prior context, which is inefficient and error-prone.
-
Working Across Multiple Directories: This would solve the critical problem of needing to operate in different project directories. A user could be working on a task, then pause the session,
cdto a new project directory in their terminal, and then resume the conversation with the full context intact. The CLI would then be able to operate on the files in the new directory. -
Handling Interruptions: If the terminal closes unexpectedly or the system reboots, the entire conversation context is lost. Session persistence would prevent this loss of work.
Additional context
Other command-line AI tools have implemented this feature effectively. For example, the Claude CLI offers several options for session management:
claude --resumelists previous conversations to choose from.claude -r <session-id>resumes a specific session by its ID.claude -ccontinues the most recent conversation.
Implementing a similar feature would make the Gemini CLI feel more like a persistent, stateful assistant and dramatically improve its usability for developers.
Found possible duplicate issues:
- #11249
- #11758
- #4205
- #1530
- #8640
- #2384
- #10090
- #5101
- #5932
If you believe this is not a duplicate, please remove the status/possible-duplicate label.
Not a Duplicate – Key Differences and Additional Context
Thank you for pointing out similar issues. After reviewing the listed possible duplicates, I believe this feature request addresses a distinct use-case:
Key differences:
- Most previous issues focus on auto-saving or automatic persistence of sessions (e.g., #11249, #11758, #8640), or involve CLI history and logging (#4205, #5101).
- My proposal is about user-controlled session pause and resume: users can explicitly pause a session and resume it later, rather than only relying on automatic or background saving. This puts users in charge of session lifecycle.
- I included an example from the Claude CLI, which lets users choose or resume conversations. However, Gemini CLI could improve upon this by allowing granular control—for example, deciding when and which sessions to pause/save or permanently discard, helping users avoid unnecessary storage clutter.
- None of the linked issues address the user’s ability to choose whether to save, discard, or resume sessions, combining manual control with auto-saving options for best usability and storage management.
Additional Context:
Other command-line AI tools (Claude CLI) offer session management features, but they do not provide the combination of auto-save and explicit user control over sessions. Implementing a feature where users decide when to save, resume, or delete sessions would make Gemini CLI more powerful and flexible for real-world developer workflows.
Summary:
This feature request is about explicit, user-driven pause and resume functionality (with smart storage options), which goes beyond the older requests for persistence, logging, and basic CLI session management.
+1 and make the sessionid visible in noninteractive sessions as well.
@mdc-git sessionId visible in non interactive session ticket: https://github.com/google-gemini/gemini-cli/issues/14435
in this vein, it would be nice to see session forking/branching too. codex cli currently has a PR for it themselves https://github.com/openai/codex/pull/6993