Skip to content

Add low/full CLI error verbosity mode for cleaner UI#20399

Merged
jacob314 merged 11 commits intomainfrom
gemini-cli-verbose-low
Feb 27, 2026
Merged

Add low/full CLI error verbosity mode for cleaner UI#20399
jacob314 merged 11 commits intomainfrom
gemini-cli-verbose-low

Conversation

@LyalinDotCom
Copy link
Collaborator

@LyalinDotCom LyalinDotCom commented Feb 26, 2026

Summary

This PR refines low-error-verbosity behavior to keep the CLI UI clean during recoverable failures while preserving diagnostics for terminal failures.

What changed

1) Footer error summary/F12 discoverability

  • In low mode (default), the bottom-right red error summary is hidden.
  • In full mode, the existing error summary remains visible.
  • In debug mode, summary remains visible even when verbosity is low.
  • Result: F12 is effectively hidden in low mode unless users are in full/debug workflows.

2) Detailed debug panel title hint

  • DetailedMessagesDisplay now shows (F12 to close) only in full mode or debug mode.
  • In low mode, the panel works but does not advertise F12 in the title.

3) Low-mode retry messaging threshold

  • Retry status messaging in low mode is now suppressed for early retries.
  • Generic progress line appears only after retries become excessive:
    • This is taking a bit longer, we're still on it.
  • Full mode keeps explicit retry attempt/model details.

4) Low-mode terminal-failure diagnostics note

  • Added a compact low-mode inline note on terminal failures:
    • This request failed. Press F12 for diagnostics, or set ui.errorVerbosity to full for full details.
  • Applied for:
    • API error events
    • submit-query catch-path terminal errors
    • AgentExecutionStopped
    • AgentExecutionBlocked
    • STOP_EXECUTION tool terminal stop path
  • Guarded to avoid duplicates per turn.
  • Suppressed-tool-error note text also now includes F12 diagnostics guidance.

Tests

Updated tests across:

  • Footer visibility behavior by verbosity/debug mode
  • DetailedMessagesDisplay F12 hint visibility
  • useLoadingIndicator low-mode retry threshold behavior
  • useGeminiStream low-mode terminal-failure diagnostics behavior
  • Existing targeted suite remains passing

@LyalinDotCom LyalinDotCom requested a review from a team as a code owner February 26, 2026 06:41
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @LyalinDotCom, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request enhances the user experience of the Gemini CLI by introducing a configurable error verbosity mode. The primary goal is to reduce visual clutter from recoverable errors during interactive sessions, making the UI cleaner and less technical by default, while still providing a 'full' mode for detailed debugging when needed. This change centralizes error handling logic and ensures a more user-friendly interface for common, transient issues.

Highlights

  • New UI Error Verbosity Setting: Introduced a new ui.errorVerbosity setting with low (default) and full modes to control the detail level of recoverable error messages in the CLI.
  • Streamlined Error Handling in 'Low' Verbosity: In low verbosity mode, retry loading text is now neutral, transient capacity fallbacks automatically retry once without interruption, errored tool-call rows are suppressed, and a compact contextual note is added before terminal failures if suppressed errors occurred.
  • Preserved Existing Behavior in 'Full' Verbosity: The full verbosity mode maintains the previously detailed error reporting and UI behavior.
  • Integration Across UI Components: The new errorVerbosity setting has been wired through AppContainer, useQuotaAndFallback, useLoadingIndicator, ToolGroupMessage, and useGeminiStream to ensure consistent behavior.
  • Comprehensive Test Coverage: New and updated tests cover the settingsSchema, useLoadingIndicator, useQuotaAndFallback, ToolGroupMessage, and useGeminiStream to validate the new error verbosity logic.
Changelog
  • packages/cli/src/config/settingsSchema.test.ts
    • Added a test to verify the errorVerbosity enum property within the UI settings schema.
  • packages/cli/src/config/settingsSchema.ts
    • Added a new errorVerbosity enum property to the UI settings schema, allowing values 'low' and 'full' with 'low' as the default.
  • packages/cli/src/ui/AppContainer.tsx
    • Passed the settings.merged.ui.errorVerbosity value to the useQuotaAndFallback and useLoadingIndicator hooks.
  • packages/cli/src/ui/components/messages/ToolGroupMessage.test.tsx
    • Imported createMockSettings for testing.
    • Added a test case to confirm that errored tool calls are hidden when in low error verbosity mode.
    • Updated existing snapshot tests to explicitly use fullVerbositySettings for consistency.
  • packages/cli/src/ui/components/messages/ToolGroupMessage.tsx
    • Imported useSettings and CoreToolCallStatus.
    • Modified the tool calls filtering logic to suppress tool calls with CoreToolCallStatus.Error when ui.errorVerbosity is set to low.
  • packages/cli/src/ui/hooks/useGeminiStream.test.tsx
    • Updated mockLoadedSettings to include ui.errorVerbosity set to full by default.
    • Modified renderTestHook to accept loadedSettings as a parameter.
    • Added a test case to verify that a compact suppressed-error note is added before STOP_EXECUTION terminal info in low verbosity mode.
  • packages/cli/src/ui/hooks/useGeminiStream.ts
    • Defined SUPPRESSED_TOOL_ERRORS_NOTE constant for the compact error message.
    • Introduced isLowErrorVerbosity, suppressedToolErrorCountRef, and suppressedToolErrorNoteShownRef for managing suppressed error state.
    • Implemented maybeAddSuppressedToolErrorNote to conditionally add the compact note.
    • Integrated maybeAddSuppressedToolErrorNote before adding terminal error messages and STOP_EXECUTION messages.
    • Reset suppressedToolErrorCountRef and suppressedToolErrorNoteShownRef at the start of a new prompt.
  • packages/cli/src/ui/hooks/useLoadingIndicator.test.tsx
    • Added initialErrorVerbosity parameter to renderLoadingIndicatorHook and TestComponent.
    • Added a test case to ensure a generic retry phrase is displayed in low error verbosity mode.
  • packages/cli/src/ui/hooks/useLoadingIndicator.ts
    • Added errorVerbosity as a prop to UseLoadingIndicatorProps with a default of full.
    • Modified the retryPhrase logic to display a generic message ('This is taking a bit longer, we're still on it.') when errorVerbosity is low.
  • packages/cli/src/ui/hooks/useQuotaAndFallback.test.ts
    • Added a test to confirm that transient capacity failures are auto-retried in low verbosity mode without user interruption.
    • Added a test to ensure terminal quota errors still prompt for user interaction even in low verbosity mode.
  • packages/cli/src/ui/hooks/useQuotaAndFallback.ts
    • Added errorVerbosity as a prop to UseQuotaAndFallbackArgs with a default of full.
    • Implemented logic to automatically return retry_once for transient, non-terminal quota errors when errorVerbosity is low, bypassing the interactive dialog.
  • schemas/settings.schema.json
    • Added the errorVerbosity property to the ui section of the settings schema, defining its title, description, default value, type, and allowed enum values (low, full).
Activity
  • The author, LyalinDotCom, has implemented the feature as described in the pull request body.
  • Validation steps, including targeted tests for affected components, have been outlined by the author.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@github-actions
Copy link

github-actions bot commented Feb 26, 2026

Size Change: +4.78 kB (+0.02%)

Total Size: 25.8 MB

Filename Size Change
./bundle/gemini.js 25.3 MB +4.78 kB (+0.02%)
ℹ️ View Unchanged
Filename Size
./bundle/node_modules/@google/gemini-cli-devtools/dist/client/main.js 221 kB
./bundle/node_modules/@google/gemini-cli-devtools/dist/src/_client-assets.js 227 kB
./bundle/node_modules/@google/gemini-cli-devtools/dist/src/index.js 11.5 kB
./bundle/node_modules/@google/gemini-cli-devtools/dist/src/types.js 132 B
./bundle/sandbox-macos-permissive-open.sb 890 B
./bundle/sandbox-macos-permissive-proxied.sb 1.31 kB
./bundle/sandbox-macos-restrictive-open.sb 3.36 kB
./bundle/sandbox-macos-restrictive-proxied.sb 3.56 kB
./bundle/sandbox-macos-strict-open.sb 4.82 kB
./bundle/sandbox-macos-strict-proxied.sb 5.02 kB

compressed-size-action

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a new ui.errorVerbosity setting, defaulting to low, to control the level of detail for recoverable errors shown in the UI. While this aims to improve UI cleanliness, the current implementation of the low verbosity mode introduces a critical security vulnerability. It suppresses tool execution errors in a way that can mislead users about the success of security-critical operations. Specifically, tool failures are hidden from the history, and errors from client-initiated tools are not counted for the final warning note, creating a gap in the audit trail that could be exploited by a compromised model to deceive the user. To address this, it is recommended to ensure the suppressed error note is shown for all turns with failures and to include client-initiated tools in the error tracking logic.

@gemini-cli gemini-cli bot added the area/core Issues related to User Interface, OS Support, Core Functionality label Feb 26, 2026
@LyalinDotCom LyalinDotCom requested a review from a team as a code owner February 26, 2026 19:42
@gemini-cli gemini-cli bot added the status/need-issue Pull requests that need to have an associated issue. label Feb 26, 2026
@LyalinDotCom LyalinDotCom removed the status/need-issue Pull requests that need to have an associated issue. label Feb 26, 2026
@gemini-cli gemini-cli bot added the status/need-issue Pull requests that need to have an associated issue. label Feb 26, 2026
@LyalinDotCom LyalinDotCom added 🔒 maintainer only ⛔ Do not contribute. Internal roadmap item. and removed status/need-issue Pull requests that need to have an associated issue. labels Feb 27, 2026
@gemini-cli gemini-cli bot added the status/need-issue Pull requests that need to have an associated issue. label Feb 27, 2026
Copy link
Contributor

@jacob314 jacob314 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@jacob314 jacob314 enabled auto-merge February 27, 2026 18:26
@jacob314 jacob314 added this pull request to the merge queue Feb 27, 2026
Merged via the queue into main with commit 7f8ce86 Feb 27, 2026
26 of 27 checks passed
@jacob314 jacob314 deleted the gemini-cli-verbose-low branch February 27, 2026 19:30
BryanBradfo pushed a commit to BryanBradfo/gemini-cli that referenced this pull request Mar 5, 2026
liamhelmer pushed a commit to badal-io/gemini-cli that referenced this pull request Mar 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/core Issues related to User Interface, OS Support, Core Functionality 🔒 maintainer only ⛔ Do not contribute. Internal roadmap item. status/need-issue Pull requests that need to have an associated issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants