Skip to content

Implement Desktop Notification for User Permission Prompts #14696

@Alexmarco-gif

Description

@Alexmarco-gif

What would you like to be added?

Problem Description

When running the Gemini CLI, the tool will often pause and require the user's explicit permission (e.g., "Do you want me to run this command?").
The current behavior is that the prompt simply sits in the terminal. If I switch to another window, or am working on another task, I receive no external notification. This frequently leads to me forgetting that the process is paused and waiting for my input, resulting in long delays and a frustrating user experience.

Proposed Solution

Implement an OS-level desktop notification when the CLI pauses and requires user confirmation or input (e.g., for command execution permission).

  1. The notification should have the following key behaviors:
    Trigger: The notification appears immediately when the CLI enters the "awaiting user confirmation" state.

  2. Content: The notification text should clearly state what is required (e.g., "Gemini CLI: Requires Permission to Execute Command").

  3. Action/Focus: Crucially, clicking the notification should bring the terminal window/application into focus, allowing the user to immediately type Y or n to continue the workflow.

Alternatives Considered

  • Terminal Spinner/Text: While useful for general processing time, this does not solve the problem of being out-of-focus and missing the permission request entirely.

  • Simple Audio Chime: A sound would alert the user, but clicking the notification to focus the terminal is the most efficient way to resume the task.

Technical Considerations (For Maintainers)

This likely requires integrating a cross-platform Node.js package for desktop notifications (e.g., node-notifier) into the core CLI structure, specifically tying the notification trigger to the logic responsible for rendering user input prompts.

Why is this needed?

The current behavior of pausing the CLI for user permission (e.g., to execute a command) without external notification creates a significant gap in the user workflow. Users often switch focus to other applications while a prompt is running. When the permission request appears, it remains unseen, leading to the user forgetting the task is paused.

This results in unnecessary friction, decreased efficiency, and substantial delays as the user has to periodically check the terminal for an update. Implementing a desktop notification with a click-to-focus action is necessary to ensure the user is immediately alerted to the required input, minimizing downtime and maintaining workflow continuity.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/coreIssues related to User Interface, OS Support, Core Functionalitypriority/p2Important but can be addressed in a future release.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions