{
"sessionId": "qclszz",
"projectHash": "384e9530e99733805bc2c98a596ab23e67d4c29a6ef263cdc1c89b3bcd022c69",
"startTime": "2026-04-17T15:23:55.515Z",
"lastUpdated": "2026-04-17T15:27:05.630Z",
"messages": [
{
"id": "d38bf209-4bde-4eea-b316-1aff5b4c0bd4",
"timestamp": "2026-04-17T15:23:55.515Z",
"type": "user",
"content": [
{
"text": "Your task is to answer the following question about Gemini CLI:\n<question>\nWhere are Gemini CLI conversations and session history stored on the filesystem?\n</question>"
}
]
},
{
"id": "c47ee387-a55e-4b5d-bebe-b8e67b2ffdc7",
"timestamp": "2026-04-17T15:23:57.196Z",
"type": "gemini",
"content": "",
"thoughts": [
{
"subject": "Finding the File Location",
"description": "I'm now investigating where the Gemini CLI stashes its conversation and session data. My initial plan is to leverage the `get_internal_docs` command to uncover any hidden documentation that points towards the file system location. This should give me the first clue.",
"timestamp": "2026-04-17T15:23:57.137Z"
}
],
"tokens": {
"input": 2264,
"output": 10,
"cached": 0,
"thoughts": 34,
"tool": 0,
"total": 2308
},
"model": "gemini-3-flash-preview",
"toolCalls": [
{
"id": "qclszz#0-0",
"name": "get_internal_docs",
"args": {
"path": ""
},
"result": [
{
"functionResponse": {
"id": "qclszz#0-0",
"name": "get_internal_docs",
"response": {
"output": "Available Gemini CLI documentation files:\n\n- CONTRIBUTING.md\n- admin/enterprise-controls.md\n- changelogs/index.md\n- changelogs/latest.md\n- changelogs/preview.md\n- cli/acp-mode.md\n- cli/checkpointing.md\n- cli/cli-reference.md\n- cli/creating-skills.md\n- cli/custom-commands.md\n- cli/enterprise.md\n- cli/gemini-ignore.md\n- cli/gemini-md.md\n- cli/generation-settings.md\n- cli/git-worktrees.md\n- cli/headless.md\n- cli/model-routing.md\n- cli/model-steering.md\n- cli/model.md\n- cli/notifications.md\n- cli/plan-mode.md\n- cli/rewind.md\n- cli/sandbox.md\n- cli/session-management.md\n- cli/settings.md\n- cli/skills.md\n- cli/system-prompt.md\n- cli/telemetry.md\n- cli/themes.md\n- cli/token-caching.md\n- cli/trusted-folders.md\n- cli/tutorials/automation.md\n- cli/tutorials/file-management.md\n- cli/tutorials/mcp-setup.md\n- cli/tutorials/memory-management.md\n- cli/tutorials/plan-mode-steering.md\n- cli/tutorials/session-management.md\n- cli/tutorials/shell-commands.md\n- cli/tutorials/skills-getting-started.md\n- cli/tutorials/task-planning.md\n- cli/tutorials/web-tools.md\n- core/index.md\n- core/local-model-routing.md\n- core/remote-agents.md\n- core/subagents.md\n- examples/proxy-script.md\n- extensions/best-practices.md\n- extensions/index.md\n- extensions/reference.md\n- extensions/releasing.md\n- extensions/writing-extensions.md\n- get-started/authentication.md\n- get-started/gemini-3.md\n- get-started/index.md\n- get-started/installation.md\n- hooks/best-practices.md\n- hooks/index.md\n- hooks/reference.md\n- hooks/writing-hooks.md\n- ide-integration/ide-companion-spec.md\n- ide-integration/index.md\n- index.md\n- integration-tests.md\n- issue-and-pr-automation.md\n- local-development.md\n- npm.md\n- reference/commands.md\n- reference/configuration.md\n- reference/keyboard-shortcuts.md\n- reference/memport.md\n- reference/policy-engine.md\n- reference/tools.md\n- release-confidence.md\n- releases.md\n- resources/faq.md\n- resources/quota-and-pricing.md\n- resources/tos-privacy.md\n- resources/troubleshooting.md\n- resources/uninstall.md\n- tools/activate-skill.md\n- tools/ask-user.md\n- tools/file-system.md\n- tools/internal-docs.md\n- tools/mcp-server.md\n- tools/memory.md\n- tools/planning.md\n- tools/shell.md\n- tools/todos.md\n- tools/web-fetch.md\n- tools/web-search.md"
}
}
}
],
"status": "success",
"timestamp": "2026-04-17T15:23:57.214Z",
"resultDisplay": "Found 90 documentation files.",
"description": "Listing all available internal documentation.",
"displayName": "GetInternalDocs",
"renderOutputAsMarkdown": true
}
]
},
{
"id": "45228b14-82ed-4e30-85b5-a27fb9583f25",
"timestamp": "2026-04-17T15:24:04.949Z",
"type": "gemini",
"content": "",
"thoughts": [
{
"subject": "Analyzing Documentation Structure",
"description": "I'm currently focused on pinpointing the storage locations for conversations and session history. I've identified `cli/session-management.md` and `cli/settings.md` as prime candidates within the documentation. These files are likely to contain the specifics I need.",
"timestamp": "2026-04-17T15:24:04.255Z"
},
{
"subject": "Identifying Key Resources",
"description": "I've zeroed in on `cli/session-management.md` and `cli/settings.md`, still. I think these documents will reveal where session and conversation data are stored. I will also check `reference/configuration.md` as well. Now I plan to delve into `cli/session-management.md` first.",
"timestamp": "2026-04-17T15:24:04.909Z"
}
],
"tokens": {
"input": 3062,
"output": 17,
"cached": 0,
"thoughts": 70,
"tool": 0,
"total": 3149
},
"model": "gemini-3-flash-preview",
"toolCalls": [
{
"id": "qclszz#1-0",
"name": "get_internal_docs",
"args": {
"path": "cli/session-management.md"
},
"result": [
{
"functionResponse": {
"id": "qclszz#1-0",
"name": "get_internal_docs",
"response": {
"output": "# Session management\n\nSession management saves your conversation history so you can resume your work\nwhere you left off. Use these features to review past interactions, manage\nhistory across different projects, and configure how long data is retained.\n\n## Automatic saving\n\nYour session history is recorded automatically as you interact with the model.\nThis background process ensures your work is preserved even if you interrupt a\nsession.\n\n- **What is saved:** The complete conversation history, including:\n - Your prompts and the model's responses.\n - All tool executions (inputs and outputs).\n - Token usage statistics (input, output, cached, etc.).\n - Assistant thoughts and reasoning summaries (when available).\n- **Location:** Sessions are stored in `~/.gemini/tmp/<project_hash>/chats/`,\n where `<project_hash>` is a unique identifier based on your project's root\n directory.\n- **Scope:** Sessions are project-specific. Switching directories to a different\n project switches to that project's session history.\n\n## Resuming sessions\n\nYou can resume a previous session to continue the conversation with all prior\ncontext restored. Resuming is supported both through command-line flags and an\ninteractive browser.\n\n### From the command line\n\nWhen starting Gemini CLI, use the `--resume` (or `-r`) flag to load existing\nsessions.\n\n- **Resume latest:**\n\n ```bash\n gemini --resume\n ```\n\n This immediately loads the most recent session.\n\n- **Resume by index:** List available sessions first (see\n [Listing sessions](#listing-sessions)), then use the index number:\n\n ```bash\n gemini --resume 1\n ```\n\n- **Resume by ID:** You can also provide the full session UUID:\n ```bash\n gemini --resume a1b2c3d4-e5f6-7890-abcd-ef1234567890\n ```\n\n### From the interactive interface\n\nWhile the CLI is running, use the `/resume` slash command to open the **Session\nBrowser**:\n\n```text\n/resume\n```\n\nWhen typing `/resume` (or `/chat`) in slash completion, commands are grouped\nunder titled separators:\n\n- `-- auto --` (session browser)\n - `list` is selectable and opens the session browser\n- `-- checkpoints --` (manual tagged checkpoint commands)\n\nUnique prefixes such as `/resum` and `/cha` resolve to the same grouped menu.\n\nThe Session Browser provides an interactive interface where you can perform the\nfollowing actions:\n\n- **Browse:** Scroll through a list of your past sessions.\n- **Preview:** See details like the session date, message count, and the first\n user prompt.\n- **Search:** Press `/` to enter search mode, then type to filter sessions by ID\n or content.\n- **Select:** Press **Enter** to resume the selected session.\n- **Esc:** Press **Esc** to exit the Session Browser.\n\n### Manual chat checkpoints\n\nFor named branch points inside a session, use chat checkpoints:\n\n```text\n/resume save decision-point\n/resume list\n/resume resume decision-point\n```\n\nCompatibility aliases:\n\n- `/chat ...` works for the same commands.\n- `/resume checkpoints ...` also remains supported during migration.\n\n## Parallel sessions with Git worktrees\n\nWhen working on multiple tasks at once, you can use\n[Git worktrees](./git-worktrees.md) to give each Gemini session its own copy of\nthe codebase. This prevents changes in one session from colliding with another.\n\n## Managing sessions\n\nYou can list and delete sessions to keep your history organized and manage disk\nspace.\n\n### Listing sessions\n\nTo see a list of all available sessions for the current project from the command\nline, use the `--list-sessions` flag:\n\n```bash\ngemini --list-sessions\n```\n\nOutput example:\n\n```text\nAvailable sessions for this project (3):\n\n 1. Fix bug in auth (2 days ago) [a1b2c3d4]\n 2. Refactor database schema (5 hours ago) [e5f67890]\n 3. Update documentation (Just now) [abcd1234]\n```\n\n### Deleting sessions\n\nYou can remove old or unwanted sessions to free up space or declutter your\nhistory.\n\n**From the command line:** Use the `--delete-session` flag with an index or ID:\n\n```bash\ngemini --delete-session 2\n```\n\n**From the Session Browser:**\n\n1. Open the browser with `/resume`.\n2. Navigate to the session you want to remove.\n3. Press **x**.\n\n## Configuration\n\nYou can configure how Gemini CLI manages your session history in your\n`settings.json` file. These settings let you control retention policies and\nsession lengths.\n\n### Session retention\n\nBy default, Gemini CLI automatically cleans up old session data to prevent your\nhistory from growing indefinitely. When a session is deleted, Gemini CLI also\nremoves all associated data, including implementation plans, task trackers, tool\noutputs, and activity logs.\n\nThe default policy is to **retain sessions for 30 days**.\n\n#### Configuration\n\nYou can customize these policies using the `/settings` command or by manually\nediting your `settings.json` file:\n\n```json\n{\n \"general\": {\n \"sessionRetention\": {\n \"enabled\": true,\n \"maxAge\": \"30d\",\n \"maxCount\": 50\n }\n }\n}\n```\n\n- **`enabled`**: (boolean) Master switch for session cleanup. Defaults to\n `true`.\n- **`maxAge`**: (string) Duration to keep sessions (for example, \"24h\", \"7d\",\n \"4w\"). Sessions older than this are deleted. Defaults to `\"30d\"`.\n- **`maxCount`**: (number) Maximum number of sessions to retain. The oldest\n sessions exceeding this count are deleted. Defaults to undefined (unlimited).\n- **`minRetention`**: (string) Minimum retention period (safety limit). Defaults\n to `\"1d\"`. Sessions newer than this period are never deleted by automatic\n cleanup.\n\n### Session limits\n\nYou can limit the length of individual sessions to prevent context windows from\nbecoming too large and expensive.\n\n```json\n{\n \"model\": {\n \"maxSessionTurns\": 100\n }\n}\n```\n\n- **`maxSessionTurns`**: (number) The maximum number of turns (user and model\n exchanges) allowed in a single session. Set to `-1` for unlimited (default).\n\n **Behavior when limit is reached:**\n - **Interactive mode:** The CLI shows an informational message and stops\n sending requests to the model. You must manually start a new session.\n - **Non-interactive mode:** The CLI exits with an error.\n\n## Next steps\n\n- Explore the [Memory tool](../tools/memory.md) to save persistent information\n across sessions.\n- Learn how to [Checkpoint](./checkpointing.md) your session state.\n- Check out the [CLI reference](./cli-reference.md) for all command-line flags.\n"
}
}
}
],
"status": "success",
"timestamp": "2026-04-17T15:24:04.962Z",
"resultDisplay": "Successfully read documentation: cli/session-management.md",
"description": "Reading internal documentation: cli/session-management.md",
"displayName": "GetInternalDocs",
"renderOutputAsMarkdown": true
}
]
},
{
"id": "ab0a9c68-3f39-43ed-a054-10783617f28e",
"timestamp": "2026-04-17T15:25:02.573Z",
"type": "gemini",
"content": "",
"thoughts": [
{
"subject": "Reviewing Session Storage",
"description": "Okay, so I've pinpointed the session storage location according to the documentation. It's in the `~/.gemini/tmp/<project_hash>/chats/` directory, as suspected. Next, I'll need to explore how the project hash is generated.",
"timestamp": "2026-04-17T15:25:01.848Z"
},
{
"subject": "Analyzing Further Locations",
"description": "I've confirmed the session storage path, as well as the project hash generation. I'm now cross-referencing this with the `settings.md` doc, hoping to find any leads on alternative storage locations. My goal is to exhaustively map out all possible persistence mechanisms for this application's conversational data.",
"timestamp": "2026-04-17T15:25:02.563Z"
}
],
"tokens": {
"input": 4656,
"output": 15,
"cached": 0,
"thoughts": 106,
"tool": 0,
"total": 4777
},
"model": "gemini-3-flash-preview",
"toolCalls": [
{
"id": "qclszz#2-0",
"name": "get_internal_docs",
"args": {
"path": "cli/settings.md"
},
"result": [
{
"functionResponse": {
"id": "qclszz#2-0",
"name": "get_internal_docs",
"response": {
"output": "# Gemini CLI settings (`/settings` command)\n\nControl your Gemini CLI experience with the `/settings` command. The `/settings`\ncommand opens a dialog to view and edit all your Gemini CLI settings, including\nyour UI experience, keybindings, and accessibility features.\n\nYour Gemini CLI settings are stored in a `settings.json` file. In addition to\nusing the `/settings` command, you can also edit them in one of the following\nlocations:\n\n- **User settings**: `~/.gemini/settings.json`\n- **Workspace settings**: `your-project/.gemini/settings.json`\n\n<!-- prettier-ignore -->\n> [!IMPORTANT]\n> Workspace settings override user settings.\n\n## Settings reference\n\nHere is a list of all the available settings, grouped by category and ordered as\nthey appear in the UI.\n\n<!-- SETTINGS-AUTOGEN:START -->\n\n### General\n\n| UI Label | Setting | Description | Default |\n| ----------------------- | ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------- |\n| Vim Mode | `general.vimMode` | Enable Vim keybindings | `false` |\n| Default Approval Mode | `general.defaultApprovalMode` | The default approval mode for tool execution. 'default' prompts for approval, 'auto_edit' auto-approves edit tools, and 'plan' is read-only mode. YOLO mode (auto-approve all actions) can only be enabled via command line (--yolo or --approval-mode=yolo). | `\"default\"` |\n| Enable Auto Update | `general.enableAutoUpdate` | Enable automatic updates. | `true` |\n| Enable Notifications | `general.enableNotifications` | Enable run-event notifications for action-required prompts and session completion. | `false` |\n| Enable Plan Mode | `general.plan.enabled` | Enable Plan Mode for read-only safety during planning. | `true` |\n| Plan Directory | `general.plan.directory` | The directory where planning artifacts are stored. If not specified, defaults to the system temporary directory. A custom directory requires a policy to allow write access in Plan Mode. | `undefined` |\n| Plan Model Routing | `general.plan.modelRouting` | Automatically switch between Pro and Flash models based on Plan Mode status. Uses Pro for the planning phase and Flash for the implementation phase. | `true` |\n| Retry Fetch Errors | `general.retryFetchErrors` | Retry on \"exception TypeError: fetch failed sending request\" errors. | `true` |\n| Max Chat Model Attempts | `general.maxAttempts` | Maximum number of attempts for requests to the main chat model. Cannot exceed 10. | `10` |\n| Debug Keystroke Logging | `general.debugKeystrokeLogging` | Enable debug logging of keystrokes to the console. | `false` |\n| Enable Session Cleanup | `general.sessionRetention.enabled` | Enable automatic session cleanup | `true` |\n| Keep chat history | `general.sessionRetention.maxAge` | Automatically delete chats older than this time period (e.g., \"30d\", \"7d\", \"24h\", \"1w\") | `\"30d\"` |\n\n### Output\n\n| UI Label | Setting | Description | Default |\n| ------------- | --------------- | ------------------------------------------------------ | -------- |\n| Output Format | `output.format` | The format of the CLI output. Can be `text` or `json`. | `\"text\"` |\n\n### UI\n\n| UI Label | Setting | Description | Default |\n| ------------------------------------ | -------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- |\n| Auto Theme Switching | `ui.autoThemeSwitching` | Automatically switch between default light and dark themes based on terminal background color. | `true` |\n| Terminal Background Polling Interval | `ui.terminalBackgroundPollingInterval` | Interval in seconds to poll the terminal background color. | `60` |\n| Hide Window Title | `ui.hideWindowTitle` | Hide the window title bar | `false` |\n| Inline Thinking | `ui.inlineThinkingMode` | Display model thinking inline: off or full. | `\"off\"` |\n| Show Thoughts in Title | `ui.showStatusInTitle` | Show Gemini CLI model thoughts in the terminal window title during the working phase | `false` |\n| Dynamic Window Title | `ui.dynamicWindowTitle` | Update the terminal window title with current status icons (Ready: ◇, Action Required: ✋, Working: ✦) | `true` |\n| Show Home Directory Warning | `ui.showHomeDirectoryWarning` | Show a warning when running Gemini CLI in the home directory. | `true` |\n| Show Compatibility Warnings | `ui.showCompatibilityWarnings` | Show warnings about terminal or OS compatibility issues. | `true` |\n| Hide Tips | `ui.hideTips` | Hide helpful tips in the UI | `false` |\n| Escape Pasted @ Symbols | `ui.escapePastedAtSymbols` | When enabled, @ symbols in pasted text are escaped to prevent unintended @path expansion. | `false` |\n| Show Shortcuts Hint | `ui.showShortcutsHint` | Show the \"? for shortcuts\" hint above the input. | `true` |\n| Compact Tool Output | `ui.compactToolOutput` | Display tool outputs (like directory listings and file reads) in a compact, structured format. | `true` |\n| Hide Banner | `ui.hideBanner` | Hide the application banner | `false` |\n| Hide Context Summary | `ui.hideContextSummary` | Hide the context summary (GEMINI.md, MCP servers) above the input. | `false` |\n| Hide CWD | `ui.footer.hideCWD` | Hide the current working directory in the footer. | `false` |\n| Hide Sandbox Status | `ui.footer.hideSandboxStatus` | Hide the sandbox status indicator in the footer. | `false` |\n| Hide Model Info | `ui.footer.hideModelInfo` | Hide the model name and context usage in the footer. | `false` |\n| Hide Context Window Percentage | `ui.footer.hideContextPercentage` | Hides the context window usage percentage. | `true` |\n| Hide Footer | `ui.hideFooter` | Hide the footer from the UI | `false` |\n| Show Memory Usage | `ui.showMemoryUsage` | Display memory usage information in the UI | `false` |\n| Show Line Numbers | `ui.showLineNumbers` | Show line numbers in the chat. | `true` |\n| Show Citations | `ui.showCitations` | Show citations for generated text in the chat. | `false` |\n| Show Model Info In Chat | `ui.showModelInfoInChat` | Show the model name in the chat for each model turn. | `false` |\n| Show User Identity | `ui.showUserIdentity` | Show the signed-in user's identity (e.g. email) in the UI. | `true` |\n| Use Alternate Screen Buffer | `ui.useAlternateBuffer` | Use an alternate screen buffer for the UI, preserving shell history. | `false` |\n| Render Process | `ui.renderProcess` | Enable Ink render process for the UI. | `true` |\n| Terminal Buffer | `ui.terminalBuffer` | Use the new terminal buffer architecture for rendering. | `false` |\n| Use Background Color | `ui.useBackgroundColor` | Whether to use background colors in the UI. | `true` |\n| Incremental Rendering | `ui.incrementalRendering` | Enable incremental rendering for the UI. This option will reduce flickering but may cause rendering artifacts. Only supported when useAlternateBuffer is enabled. | `true` |\n| Show Spinner | `ui.showSpinner` | Show the spinner during operations. | `true` |\n| Loading Phrases | `ui.loadingPhrases` | What to show while the model is working: tips, witty comments, all, or off. | `\"off\"` |\n| Error Verbosity | `ui.errorVerbosity` | Controls whether recoverable errors are hidden (low) or fully shown (full). | `\"low\"` |\n| Screen Reader Mode | `ui.accessibility.screenReader` | Render output in plain-text to be more screen reader accessible | `false` |\n\n### IDE\n\n| UI Label | Setting | Description | Default |\n| -------- | ------------- | ---------------------------- | ------- |\n| IDE Mode | `ide.enabled` | Enable IDE integration mode. | `false` |\n\n### Billing\n\n| UI Label | Setting | Description | Default |\n| ---------------- | ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- |\n| Overage Strategy | `billing.overageStrategy` | How to handle quota exhaustion when AI credits are available. 'ask' prompts each time, 'always' automatically uses credits, 'never' disables credit usage. | `\"ask\"` |\n\n### Model\n\n| UI Label | Setting | Description | Default |\n| ----------------------------- | ---------------------------- | -------------------------------------------------------------------------------------- | ----------- |\n| Model | `model.name` | The Gemini model to use for conversations. | `undefined` |\n| Max Session Turns | `model.maxSessionTurns` | Maximum number of user/model/tool turns to keep in a session. -1 means unlimited. | `-1` |\n| Context Compression Threshold | `model.compressionThreshold` | The fraction of context usage at which to trigger context compression (e.g. 0.2, 0.3). | `0.5` |\n| Disable Loop Detection | `model.disableLoopDetection` | Disable automatic detection and prevention of infinite loops. | `false` |\n| Skip Next Speaker Check | `model.skipNextSpeakerCheck` | Skip the next speaker check. | `true` |\n\n### Agents\n\n| UI Label | Setting | Description | Default |\n| ------------------------- | ---------------------------------------- | --------------------------------------------------------------------------------------------- | ------- |\n| Confirm Sensitive Actions | `agents.browser.confirmSensitiveActions` | Require manual confirmation for sensitive browser actions (e.g., fill_form, evaluate_script). | `false` |\n| Block File Uploads | `agents.browser.blockFileUploads` | Hard-block file upload requests from the browser agent. | `false` |\n\n### Context\n\n| UI Label | Setting | Description | Default |\n| ------------------------------------ | ------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- |\n| Memory Discovery Max Dirs | `context.discoveryMaxDirs` | Maximum number of directories to search for memory. | `200` |\n| Load Memory From Include Directories | `context.loadMemoryFromIncludeDirectories` | Controls how /memory reload loads GEMINI.md files. When true, include directories are scanned; when false, only the current directory is used. | `false` |\n| Respect .gitignore | `context.fileFiltering.respectGitIgnore` | Respect .gitignore files when searching. | `true` |\n| Respect .geminiignore | `context.fileFiltering.respectGeminiIgnore` | Respect .geminiignore files when searching. | `true` |\n| Enable Recursive File Search | `context.fileFiltering.enableRecursiveFileSearch` | Enable recursive file search functionality when completing @ references in the prompt. | `true` |\n| Enable Fuzzy Search | `context.fileFiltering.enableFuzzySearch` | Enable fuzzy search when searching for files. | `true` |\n| Custom Ignore File Paths | `context.fileFiltering.customIgnoreFilePaths` | Additional ignore file paths to respect. These files take precedence over .geminiignore and .gitignore. Files earlier in the array take precedence over files later in the array, e.g. the first file takes precedence over the second one. | `[]` |\n\n### Tools\n\n| UI Label | Setting | Description | Default |\n| -------------------------------- | ------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- |\n| Sandbox Allowed Paths | `tools.sandboxAllowedPaths` | List of additional paths that the sandbox is allowed to access. | `[]` |\n| Sandbox Network Access | `tools.sandboxNetworkAccess` | Whether the sandbox is allowed to access the network. | `false` |\n| Enable Interactive Shell | `tools.shell.enableInteractiveShell` | Use node-pty for an interactive shell experience. Fallback to child_process still applies. | `true` |\n| Show Color | `tools.shell.showColor` | Show color in shell output. | `true` |\n| Use Ripgrep | `tools.useRipgrep` | Use ripgrep for file content search instead of the fallback implementation. Provides faster search performance. | `true` |\n| Tool Output Truncation Threshold | `tools.truncateToolOutputThreshold` | Maximum characters to show when truncating large tool outputs. Set to 0 or negative to disable truncation. | `40000` |\n| Disable LLM Correction | `tools.disableLLMCorrection` | Disable LLM-based error correction for edit tools. When enabled, tools will fail immediately if exact string matches are not found, instead of attempting to self-correct. | `true` |\n\n### Security\n\n| UI Label | Setting | Description | Default |\n| ------------------------------------- | ----------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------- |\n| Tool Sandboxing | `security.toolSandboxing` | Tool-level sandboxing. Isolates individual tools instead of the entire CLI process. | `false` |\n| Disable YOLO Mode | `security.disableYoloMode` | Disable YOLO mode, even if enabled by a flag. | `false` |\n| Disable Always Allow | `security.disableAlwaysAllow` | Disable \"Always allow\" options in tool confirmation dialogs. | `false` |\n| Allow Permanent Tool Approval | `security.enablePermanentToolApproval` | Enable the \"Allow for all future sessions\" option in tool confirmation dialogs. | `false` |\n| Auto-add to Policy by Default | `security.autoAddToPolicyByDefault` | When enabled, the \"Allow for all future sessions\" option becomes the default choice for low-risk tools in trusted workspaces. | `false` |\n| Blocks extensions from Git | `security.blockGitExtensions` | Blocks installing and loading extensions from Git. | `false` |\n| Extension Source Regex Allowlist | `security.allowedExtensions` | List of Regex patterns for allowed extensions. If nonempty, only extensions that match the patterns in this list are allowed. Overrides the blockGitExtensions setting. | `[]` |\n| Folder Trust | `security.folderTrust.enabled` | Setting to track whether Folder trust is enabled. | `true` |\n| Enable Environment Variable Redaction | `security.environmentVariableRedaction.enabled` | Enable redaction of environment variables that may contain secrets. | `false` |\n| Enable Context-Aware Security | `security.enableConseca` | Enable the context-aware security checker. This feature uses an LLM to dynamically generate and enforce security policies for tool use based on your prompt, providing an additional layer of protection against unintended actions. | `false` |\n\n### Advanced\n\n| UI Label | Setting | Description | Default |\n| --------------------------------- | ------------------------------ | --------------------------------------------- | ------- |\n| Auto Configure Max Old Space Size | `advanced.autoConfigureMemory` | Automatically configure Node.js memory limits | `true` |\n\n### Experimental\n\n| UI Label | Setting | Description | Default |\n| ---------------------------------------------------- | ----------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- |\n| Enable Git Worktrees | `experimental.worktrees` | Enable automated Git worktree management for parallel work. | `false` |\n| Use OSC 52 Paste | `experimental.useOSC52Paste` | Use OSC 52 for pasting. This may be more robust than the default system when using remote terminal sessions (if your terminal is configured to allow it). | `false` |\n| Use OSC 52 Copy | `experimental.useOSC52Copy` | Use OSC 52 for copying. This may be more robust than the default system when using remote terminal sessions (if your terminal is configured to allow it). | `false` |\n| Model Steering | `experimental.modelSteering` | Enable model steering (user hints) to guide the model during tool execution. | `false` |\n| Direct Web Fetch | `experimental.directWebFetch` | Enable web fetch behavior that bypasses LLM summarization. | `false` |\n| Memory Manager Agent | `experimental.memoryManager` | Replace the built-in save_memory tool with a memory manager subagent that supports adding, removing, de-duplicating, and organizing memories. | `false` |\n| Use the generalist profile to manage agent contexts. | `experimental.generalistProfile` | Suitable for general coding and software development tasks. | `false` |\n| Enable Context Management | `experimental.contextManagement` | Enable logic for context management. | `false` |\n| Topic & Update Narration | `experimental.topicUpdateNarration` | Enable the experimental Topic & Update communication model for reduced chattiness and structured progress reporting. | `false` |\n\n### Skills\n\n| UI Label | Setting | Description | Default |\n| ------------------- | ---------------- | -------------------- | ------- |\n| Enable Agent Skills | `skills.enabled` | Enable Agent Skills. | `true` |\n\n### HooksConfig\n\n| UI Label | Setting | Description | Default |\n| ------------------ | --------------------------- | -------------------------------------------------------------------------------- | ------- |\n| Enable Hooks | `hooksConfig.enabled` | Canonical toggle for the hooks system. When disabled, no hooks will be executed. | `true` |\n| Hook Notifications | `hooksConfig.notifications` | Show visual indicators when hooks are executing. | `true` |\n\n<!-- SETTINGS-AUTOGEN:END -->\n"
}
}
}
],
"status": "success",
"timestamp": "2026-04-17T15:25:02.601Z",
"resultDisplay": "Successfully read documentation: cli/settings.md",
"description": "Reading internal documentation: cli/settings.md",
"displayName": "GetInternalDocs",
"renderOutputAsMarkdown": true
}
]
},
{
"id": "0a11b775-496c-4360-a914-f293dddf6e48",
"timestamp": "2026-04-17T15:26:43.407Z",
"type": "gemini",
"content": "",
"thoughts": [
{
"subject": "Investigating Session Storage",
"description": "I've confirmed the session storage location as specified in `cli/session-management.md`: it's within the `~/.gemini/tmp/<project_hash>/chats/` directory. Next, I'm checking `cli/ cli-reference.md` to ensure no other storage-related flags or configurations exist that would affect how sessions are saved.",
"timestamp": "2026-04-17T15:26:43.330Z"
}
],
"tokens": {
"input": 9245,
"output": 17,
"cached": 0,
"thoughts": 65,
"tool": 0,
"total": 9327
},
"model": "gemini-3-flash-preview",
"toolCalls": [
{
"id": "qclszz#3-0",
"name": "get_internal_docs",
"args": {
"path": "cli/cli-reference.md"
},
"result": [
{
"functionResponse": {
"id": "qclszz#3-0",
"name": "get_internal_docs",
"response": {
"output": "# Gemini CLI cheatsheet\n\nThis page provides a reference for commonly used Gemini CLI commands, options,\nand parameters.\n\n## CLI commands\n\n| Command | Description | Example |\n| ---------------------------------- | ---------------------------------- | ------------------------------------------------------------ |\n| `gemini` | Start interactive REPL | `gemini` |\n| `gemini -p \"query\"` | Query non-interactively | `gemini -p \"summarize README.md\"` |\n| `gemini \"query\"` | Query and continue interactively | `gemini \"explain this project\"` |\n| `cat file \\| gemini` | Process piped content | `cat logs.txt \\| gemini`<br>`Get-Content logs.txt \\| gemini` |\n| `gemini -i \"query\"` | Execute and continue interactively | `gemini -i \"What is the purpose of this project?\"` |\n| `gemini -r \"latest\"` | Continue most recent session | `gemini -r \"latest\"` |\n| `gemini -r \"latest\" \"query\"` | Continue session with a new prompt | `gemini -r \"latest\" \"Check for type errors\"` |\n| `gemini -r \"<session-id>\" \"query\"` | Resume session by ID | `gemini -r \"abc123\" \"Finish this PR\"` |\n| `gemini update` | Update to latest version | `gemini update` |\n| `gemini extensions` | Manage extensions | See [Extensions Management](#extensions-management) |\n| `gemini mcp` | Configure MCP servers | See [MCP Server Management](#mcp-server-management) |\n\n### Positional arguments\n\n| Argument | Type | Description |\n| -------- | ----------------- | ---------------------------------------------------------------------------------------------------------- |\n| `query` | string (variadic) | Positional prompt. Defaults to interactive mode in a TTY. Use `-p/--prompt` for non-interactive execution. |\n\n## Interactive commands\n\nThese commands are available within the interactive REPL.\n\n| Command | Description |\n| -------------------- | ---------------------------------------- |\n| `/skills reload` | Reload discovered skills from disk |\n| `/agents reload` | Reload the agent registry |\n| `/commands reload` | Reload custom slash commands |\n| `/memory reload` | Reload context files (e.g., `GEMINI.md`) |\n| `/mcp reload` | Restart and reload MCP servers |\n| `/extensions reload` | Reload all active extensions |\n| `/help` | Show help for all commands |\n| `/quit` | Exit the interactive session |\n\n## CLI Options\n\n| Option | Alias | Type | Default | Description |\n| -------------------------------- | ----- | ------- | --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `--debug` | `-d` | boolean | `false` | Run in debug mode with verbose logging |\n| `--version` | `-v` | - | - | Show CLI version number and exit |\n| `--help` | `-h` | - | - | Show help information |\n| `--model` | `-m` | string | `auto` | Model to use. See [Model Selection](#model-selection) for available values. |\n| `--prompt` | `-p` | string | - | Prompt text. Appended to stdin input if provided. Forces non-interactive mode. |\n| `--prompt-interactive` | `-i` | string | - | Execute prompt and continue in interactive mode |\n| `--worktree` | `-w` | string | - | Start Gemini in a new git worktree. If no name is provided, one is generated automatically. Requires `experimental.worktrees: true` in settings. |\n| `--sandbox` | `-s` | boolean | `false` | Run in a sandboxed environment for safer execution |\n| `--approval-mode` | - | string | `default` | Approval mode for tool execution. Choices: `default`, `auto_edit`, `yolo`, `plan` |\n| `--yolo` | `-y` | boolean | `false` | **Deprecated.** Auto-approve all actions. Use `--approval-mode=yolo` instead. |\n| `--experimental-acp` | - | boolean | - | Start in ACP (Agent Code Pilot) mode. **Experimental feature.** |\n| `--experimental-zed-integration` | - | boolean | - | Run in Zed editor integration mode. **Experimental feature.** |\n| `--allowed-mcp-server-names` | - | array | - | Allowed MCP server names (comma-separated or multiple flags) |\n| `--allowed-tools` | - | array | - | **Deprecated.** Use the [Policy Engine](../reference/policy-engine.md) instead. Tools that are allowed to run without confirmation (comma-separated or multiple flags) |\n| `--extensions` | `-e` | array | - | List of extensions to use. If not provided, all extensions are enabled (comma-separated or multiple flags) |\n| `--list-extensions` | `-l` | boolean | - | List all available extensions and exit |\n| `--resume` | `-r` | string | - | Resume a previous session. Use `\"latest\"` for most recent or index number (e.g. `--resume 5`) |\n| `--list-sessions` | - | boolean | - | List available sessions for the current project and exit |\n| `--delete-session` | - | string | - | Delete a session by index number (use `--list-sessions` to see available sessions) |\n| `--include-directories` | - | array | - | Additional directories to include in the workspace (comma-separated or multiple flags) |\n| `--screen-reader` | - | boolean | - | Enable screen reader mode for accessibility |\n| `--output-format` | `-o` | string | `text` | The format of the CLI output. Choices: `text`, `json`, `stream-json` |\n\n## Model selection\n\nThe `--model` (or `-m`) flag lets you specify which Gemini model to use. You can\nuse either model aliases (user-friendly names) or concrete model names.\n\n### Model aliases\n\nThese are convenient shortcuts that map to specific models:\n\n| Alias | Resolves To | Description |\n| ------------ | ------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------- |\n| `auto` | `gemini-2.5-pro` or `gemini-3-pro-preview` | **Default.** Resolves to the preview model if preview features are enabled, otherwise resolves to the standard pro model. |\n| `pro` | `gemini-2.5-pro` or `gemini-3-pro-preview` | For complex reasoning tasks. Uses preview model if enabled. |\n| `flash` | `gemini-2.5-flash` | Fast, balanced model for most tasks. |\n| `flash-lite` | `gemini-2.5-flash-lite` | Fastest model for simple tasks. |\n\n## Extensions management\n\n| Command | Description | Example |\n| -------------------------------------------------- | -------------------------------------------- | ------------------------------------------------------------------------------ |\n| `gemini extensions install <source>` | Install extension from Git URL or local path | `gemini extensions install https://github.com/user/my-extension` |\n| `gemini extensions install <source> --ref <ref>` | Install from specific branch/tag/commit | `gemini extensions install https://github.com/user/my-extension --ref develop` |\n| `gemini extensions install <source> --auto-update` | Install with auto-update enabled | `gemini extensions install https://github.com/user/my-extension --auto-update` |\n| `gemini extensions uninstall <name>` | Uninstall one or more extensions | `gemini extensions uninstall my-extension` |\n| `gemini extensions list` | List all installed extensions | `gemini extensions list` |\n| `gemini extensions update <name>` | Update a specific extension | `gemini extensions update my-extension` |\n| `gemini extensions update --all` | Update all extensions | `gemini extensions update --all` |\n| `gemini extensions enable <name>` | Enable an extension | `gemini extensions enable my-extension` |\n| `gemini extensions disable <name>` | Disable an extension | `gemini extensions disable my-extension` |\n| `gemini extensions link <path>` | Link local extension for development | `gemini extensions link /path/to/extension` |\n| `gemini extensions new <path>` | Create new extension from template | `gemini extensions new ./my-extension` |\n| `gemini extensions validate <path>` | Validate extension structure | `gemini extensions validate ./my-extension` |\n\nSee [Extensions Documentation](../extensions/index.md) for more details.\n\n## MCP server management\n\n| Command | Description | Example |\n| ------------------------------------------------------------- | ------------------------------- | ---------------------------------------------------------------------------------------------------- |\n| `gemini mcp add <name> <command>` | Add stdio-based MCP server | `gemini mcp add github npx -y @modelcontextprotocol/server-github` |\n| `gemini mcp add <name> <url> --transport http` | Add HTTP-based MCP server | `gemini mcp add api-server http://localhost:3000 --transport http` |\n| `gemini mcp add <name> <command> --env KEY=value` | Add with environment variables | `gemini mcp add slack node server.js --env SLACK_TOKEN=xoxb-xxx` |\n| `gemini mcp add <name> <command> --scope user` | Add with user scope | `gemini mcp add db node db-server.js --scope user` |\n| `gemini mcp add <name> <command> --include-tools tool1,tool2` | Add with specific tools | `gemini mcp add github npx -y @modelcontextprotocol/server-github --include-tools list_repos,get_pr` |\n| `gemini mcp remove <name>` | Remove an MCP server | `gemini mcp remove github` |\n| `gemini mcp list` | List all configured MCP servers | `gemini mcp list` |\n\nSee [MCP Server Integration](../tools/mcp-server.md) for more details.\n\n## Skills management\n\n| Command | Description | Example |\n| -------------------------------- | ------------------------------------- | ------------------------------------------------- |\n| `gemini skills list` | List all discovered agent skills | `gemini skills list` |\n| `gemini skills install <source>` | Install skill from Git, path, or file | `gemini skills install https://github.com/u/repo` |\n| `gemini skills link <path>` | Link local agent skills via symlink | `gemini skills link /path/to/my-skills` |\n| `gemini skills uninstall <name>` | Uninstall an agent skill | `gemini skills uninstall my-skill` |\n| `gemini skills enable <name>` | Enable an agent skill | `gemini skills enable my-skill` |\n| `gemini skills disable <name>` | Disable an agent skill | `gemini skills disable my-skill` |\n| `gemini skills enable --all` | Enable all skills | `gemini skills enable --all` |\n| `gemini skills disable --all` | Disable all skills | `gemini skills disable --all` |\n\nSee [Agent Skills Documentation](./skills.md) for more details.\n"
}
}
}
],
"status": "success",
"timestamp": "2026-04-17T15:26:43.434Z",
"resultDisplay": "Successfully read documentation: cli/cli-reference.md",
"description": "Reading internal documentation: cli/cli-reference.md",
"displayName": "GetInternalDocs",
"renderOutputAsMarkdown": true
}
]
},
{
"id": "b9c07007-b0f0-409f-9fe0-5618cd3c5543",
"timestamp": "2026-04-17T15:26:51.748Z",
"type": "gemini",
"content": "",
"thoughts": [
{
"subject": "Discovering Gemini's Storage",
"description": "I've been examining the file locations Gemini uses. The `cli-reference.md` didn't unveil new paths. Right now, I'm noting where sessions and user settings are stored. Sessions appear in `~/.gemini/tmp/< project_hash>/chats/`, while user settings reside in `~/.`.",
"timestamp": "2026-04-17T15:26:51.032Z"
},
{
"subject": "Unveiling More Paths",
"description": "I've exhausted the `cli-reference.md` and related docs, but no luck uncovering additional storage locations. I'm focusing now on `gemini-md.md` and `checkpointing.md`. I am also taking note of the location of workspace settings at `your-project/.gemini/settings.json`.",
"timestamp": "2026-04-17T15:26:51.636Z"
}
],
"tokens": {
"input": 12167,
"output": 16,
"cached": 7775,
"thoughts": 126,
"tool": 0,
"total": 12309
},
"model": "gemini-3-flash-preview",
"toolCalls": [
{
"id": "qclszz#4-0",
"name": "get_internal_docs",
"args": {
"path": "cli/checkpointing.md"
},
"result": [
{
"functionResponse": {
"id": "qclszz#4-0",
"name": "get_internal_docs",
"response": {
"output": "# Checkpointing\n\nThe Gemini CLI includes a Checkpointing feature that automatically saves a\nsnapshot of your project's state before any file modifications are made by\nAI-powered tools. This lets you safely experiment with and apply code changes,\nknowing you can instantly revert back to the state before the tool was run.\n\n## How it works\n\nWhen you approve a tool that modifies the file system (like `write_file` or\n`replace`), the CLI automatically creates a \"checkpoint.\" This checkpoint\nincludes:\n\n1. **A Git snapshot:** A commit is made in a special, shadow Git repository\n located in your home directory (`~/.gemini/history/<project_hash>`). This\n snapshot captures the complete state of your project files at that moment.\n It does **not** interfere with your own project's Git repository.\n2. **Conversation history:** The entire conversation you've had with the agent\n up to that point is saved.\n3. **The tool call:** The specific tool call that was about to be executed is\n also stored.\n\nIf you want to undo the change or simply go back, you can use the `/restore`\ncommand. Restoring a checkpoint will:\n\n- Revert all files in your project to the state captured in the snapshot.\n- Restore the conversation history in the CLI.\n- Re-propose the original tool call, allowing you to run it again, modify it, or\n simply ignore it.\n\nAll checkpoint data, including the Git snapshot and conversation history, is\nstored locally on your machine. The Git snapshot is stored in the shadow\nrepository while the conversation history and tool calls are saved in a JSON\nfile in your project's temporary directory, typically located at\n`~/.gemini/tmp/<project_hash>/checkpoints`.\n\n## Enabling the feature\n\nThe Checkpointing feature is disabled by default. To enable it, you need to edit\nyour `settings.json` file.\n\n<!-- prettier-ignore -->\n> [!CAUTION]\n> The `--checkpointing` command-line flag was removed in version\n> 0.11.0. Checkpointing can now only be enabled through the `settings.json`\n> configuration file.\n\nAdd the following key to your `settings.json`:\n\n```json\n{\n \"general\": {\n \"checkpointing\": {\n \"enabled\": true\n }\n }\n}\n```\n\n## Using the `/restore` command\n\nOnce enabled, checkpoints are created automatically. To manage them, you use the\n`/restore` command.\n\n### List available checkpoints\n\nTo see a list of all saved checkpoints for the current project, simply run:\n\n```\n/restore\n```\n\nThe CLI will display a list of available checkpoint files. These file names are\ntypically composed of a timestamp, the name of the file being modified, and the\nname of the tool that was about to be run (e.g.,\n`2025-06-22T10-00-00_000Z-my-file.txt-write_file`).\n\n### Restore a specific checkpoint\n\nTo restore your project to a specific checkpoint, use the checkpoint file from\nthe list:\n\n```\n/restore <checkpoint_file>\n```\n\nFor example:\n\n```\n/restore 2025-06-22T10-00-00_000Z-my-file.txt-write_file\n```\n\nAfter running the command, your files and conversation will be immediately\nrestored to the state they were in when the checkpoint was created, and the\noriginal tool prompt will reappear.\n"
}
}
}
],
"status": "success",
"timestamp": "2026-04-17T15:26:51.768Z",
"resultDisplay": "Successfully read documentation: cli/checkpointing.md",
"description": "Reading internal documentation: cli/checkpointing.md",
"displayName": "GetInternalDocs",
"renderOutputAsMarkdown": true
}
]
},
{
"id": "1e1ecf7a-4ac9-4d13-9e33-f7876ec4d479",
"timestamp": "2026-04-17T15:26:55.492Z",
"type": "user",
"content": [
{
"text": "You have exceeded the time limit. You have one final chance to complete the task with a short grace period. You MUST call `complete_task` immediately with your best answer and explain that your investigation was interrupted. Do not call any other tools."
}
]
},
{
"id": "6e3ddf1e-ec7f-462b-8535-07d1876f9289",
"timestamp": "2026-04-17T15:27:05.620Z",
"type": "gemini",
"content": "",
"thoughts": [
{
"subject": "Analyzing Gemini's Data Storage",
"description": "I'm now investigating the specific storage locations for Gemini CLI session data. I've pinpointed the `~/.gemini/tmp/<project_hash>/chats/` directory as the primary location, according to the documentation. I'm focusing on the implications of `<project_hash>` and how it affects data retrieval.",
"timestamp": "2026-04-17T15:27:03.167Z"
},
{
"subject": "Identifying Data Sources and Paths",
"description": "I've located the key data stores for the user's query: chat history within `~/.gemini/tmp/<project_hash>/chats/`, checkpoints in `~/.gemini/tmp/<project_hash>/checkpoints`, and settings in `~/.gemini/settings.json` and project-specific settings. I'm preparing a consolidated response, citing the source files: `cli/session-management.md` and `cli/checkpointing.md`. The project hash is the crux of the search.",
"timestamp": "2026-04-17T15:27:05.604Z"
}
],
"tokens": {
"input": 13022,
"output": 187,
"cached": 0,
"thoughts": 242,
"tool": 0,
"total": 13451
},
"model": "gemini-3-flash-preview",
"toolCalls": [
{
"id": "qclszz#6-0",
"name": "complete_task",
"args": {
"report": {
"answer": "Gemini CLI conversations and session history are primarily stored in the following filesystem locations:\n\n- **Sessions/Conversation History:** `~/.gemini/tmp/<project_hash>/chats/`\n- **Checkpoints (Manual and Automatic snapshots):** `~/.gemini/tmp/<project_hash>/checkpoints`\n\nThe `<project_hash>` is a unique identifier generated based on your project's root directory. Each project has its own separate session history.\n\nAdditionally, Gemini CLI uses a \"shadow Git repository\" to store snapshots of project files for checkpointing purposes, located at:\n- **Git Snapshots:** `~/.gemini/history/<project_hash>`\n\nMy investigation was interrupted by the time limit, but the documentation clearly specifies these paths for session and history management.",
"sources": [
"cli/session-management.md",
"cli/checkpointing.md"
]
}
},
"result": [
{
"functionResponse": {
"id": "qclszz#6-0",
"name": "complete_task",
"response": {
"output": "Output submitted and task completed."
}
}
}
],
"status": "success",
"timestamp": "2026-04-17T15:27:05.628Z",
"resultDisplay": "Output submitted and task completed.",
"description": "Completing task and submitting results.",
"displayName": "Complete Task",
"renderOutputAsMarkdown": true
}
]
}
],
"directories": [
"/Users/ben/empathic/oss/toolpath"
],
"kind": "subagent",
"summary": "{\n \"answer\": \"Gemini CLI conversations and session history are primarily stored in the following filesystem locations:\\n\\n- **Sessions/Conversation History:** `~/.gemini/tmp/<project_hash>/chats/`..."
}