Skip to content
gemini-session-management logo

Gemini Session Management

gemini-session-management

Central authority for Gemini CLI session management. Covers session resume, retention policies, session browser, and cleanup. Use when resuming Gemini sessions, configuring retention, browsing past sessions, or managing session storage. Delegates 100% to gemini-cli-docs for official documentation.

SKILL.md

Full skill instructions

Gemini Session Management

MANDATORY: Invoke gemini-cli-docs First

STOP - Before providing ANY response about Gemini sessions:

  1. INVOKE gemini-cli-docs skill
  2. QUERY for the specific session topic
  3. BASE responses EXCLUSIVELY on official documentation loaded

Overview

Meta-skill for managing Gemini CLI sessions. Sessions preserve conversation history and can be resumed, searched, and configured with retention policies.

When to Use This Skill

Keywords: session, resume, /​resume, session browser, retention, maxAge, maxCount, --list-sessions, --delete-session

Use this skill when:

  • Resuming a previous session
  • Configuring session retention
  • Browsing past sessions
  • Managing session storage
  • Understanding session limits

Session Resume

Resume Last Session

gemini --resume
# or
gemini -r

Resume via Browser

In an active session:

/​resume

Opens interactive session browser to search and select.

Session Retention

Configure automatic cleanup in settings.json:

{
  "general": {
    "sessionRetention": {
      "maxAge": "7d",
      "maxCount": 100,
      "minRetention": "1d"
    }
  }
}
SettingDescriptionExample
maxAgeMaximum session age"7d", "24h"
maxCountMaximum sessions to keep100, 50
minRetentionMinimum time before deletion"1d", "12h"

Session Limits

Configure turn limits:

{
  "general": {
    "maxSessionTurns": 100
  }
}

Session Storage

Sessions are stored in:

~/​.gemini/​tmp/<project_hash>/

Command Line Options

OptionDescription
--resume, -rResume last session
--list-sessionsList available sessions
--delete-session <id>Delete specific session

Keyword Registry (Delegates to gemini-cli-docs)

TopicQuery Keywords
Resume--resume flag, resume session, /​resume command
Browsersession browser, search sessions, /​resume interactive
RetentionsessionRetention, maxAge maxCount, session cleanup
LimitsmaxSessionTurns, session limits, turn limits
Storagesession storage, ~/​.gemini/​tmp, session location
Management--list-sessions, --delete-session, session management

Quick Decision Tree

What do you want to do?

  1. Resume last session -> gemini --resume or gemini -r
  2. Browse past sessions -> /​resume in active session
  3. Configure retention -> Edit sessionRetention in settings.json
  4. List all sessions -> gemini --list-sessions
  5. Delete session -> gemini --delete-session <id>
  6. Set turn limits -> Configure maxSessionTurns

Best Practices

  1. Regular cleanup: Configure retention to avoid disk bloat
  2. Name sessions: Use descriptive prompts for easy browsing
  3. Resume for context: Continue complex conversations
  4. Delete sensitive: Remove sessions with sensitive data

Verification Checkpoint

  • Did I invoke gemini-cli-docs skill?
  • Did official documentation load?
  • Is my response based EXCLUSIVELY on official docs?

Test Scenarios

Scenario 1: Resume Session

Query: "How do I resume my last Gemini CLI session?" Expected Behavior:

  • Skill activates on "resume" or "session"
  • Provides gemini --resume command Success Criteria: User receives resume command and /​resume browser option

Scenario 2: Configure Retention

Query: "How do I limit Gemini session storage?" Expected Behavior:

  • Skill activates on "retention" or "session storage"
  • Delegates to gemini-cli-docs for sessionRetention settings Success Criteria: User receives settings.json configuration with maxAge/​maxCount

Scenario 3: Delete Session

Query: "How do I delete old Gemini sessions?" Expected Behavior:

  • Skill activates on "delete session" or "session management"
  • Provides --delete-session command Success Criteria: User receives deletion workflow and list-sessions option

References

Query gemini-cli-docs for official documentation on:

  • "session management"
  • "session resume"
  • "sessionRetention"

Version History

  • v1.1.0 (2025-12-01): Added Test Scenarios section
  • v1.0.0 (2025-11-25): Initial release

More Productivity & Planning skills

brainstorming logo
Productivity & Planning

brainstorming

Structured design dialogue that validates ideas before implementation begins.

295.4K 385.7K
View
ui-ux-pro-max logo
Productivity & Planning

ui-ux-pro-max

Comprehensive design intelligence for web and mobile UI/UX across 10 technology stacks.

133.1K 383.9K
View
writing-plans logo
Productivity & Planning

writing-plans

Comprehensive implementation plans for multi-step tasks, breaking down specs into bite-sized, testable steps.

295.4K 268K
View
using-superpowers logo
Productivity & Planning

using-superpowers

Introduction to the obra skills system with mandatory skill invocation rules and best practices.

295.4K 259.8K
View
executing-plans logo
Productivity & Planning

executing-plans

Execute a written implementation plan with critical review and task checkpoints.

295.4K 229.1K
View
dispatching-parallel-agents logo
Productivity & Planning

dispatching-parallel-agents

Delegate independent tasks to specialized agents working concurrently with isolated context.

295.4K 206.3K
View
using-git-worktrees logo
Productivity & Planning

using-git-worktrees

Isolated git worktrees with smart directory selection and safety verification.

295.4K 205.2K
View
webapp-testing logo
Productivity & Planning

webapp-testing

Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.

179.7K 170.6K
View
content-strategy logo
Productivity & Planning

content-strategy

Plan searchable and shareable content that drives traffic, builds authority, and generates leads.

53.3K 150.9K
View
repo-intake-and-plan logo
Productivity & Planning

repo-intake-and-plan

README-first repository scanner that extracts commands and classifies reproduction candidates without executing them.

497 139.6K
View
marketing-ideas logo
Productivity & Planning

marketing-ideas

Brainstorm and prioritize marketing strategies tailored to your SaaS stage, budget, and goals.

53.3K 137.2K
View
site-architecture logo
Productivity & Planning

site-architecture

Plan and optimize your website's page hierarchy, navigation, URL structure, and internal linking.

53.3K 112.8K
View

Productivity AI tools

Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View
SaveDay logo
Productivity

SaveDay

Capture, organize, and utilize your knowledge effortlessly.

Free
View
Any Summary logo
Productivity

Any Summary

Instant Summaries of Audio & Video Interviews with AnySummary

Freemium
View
M
Productivity

Map This

Transform PDFs into engaging mind maps.

Freemium
View
ChatPDF logo
Productivity

ChatPDF

Chat with any PDF instantly

Free
View
I
Productivity

intellisay

Create an optimal daily plan using your voice

Paid
View
A
Productivity

Aurora AI

A productivity platform to centralize organizational knowledge and workflows with contextual AI assistance.

Paid
View
AskYourPDF logo
Productivity

AskYourPDF

AskYourPDF Pricing Plans: Tailored to Your Needs

Free
View