gemini-cli icon indicating copy to clipboard operation
gemini-cli copied to clipboard

Bug: /chat delete lacks confirmation, risking accidental data loss

Open samucodesh opened this issue 1 year ago • 5 comments

What happened?

The /chat delete command executes immediately upon invocation, without a confirmation step. This behavior, especially when using tab-completion to select a chat, makes it easy to accidentally delete the wrong conversation history. I experienced this firsthand when I unintentionally deleted a valuable chat session. The command currently operates in what could be described as "YOLO Mode," offering no protection against user error.

Image

What did you expect to happen?

I expected the CLI to prompt for confirmation before permanently deleting a chat checkpoint. An interactive dialog asking,

  1. Yes, allow once
  2. Yes, allow always for this session
  3. No (esc)

would prevent accidental data loss and align with best practices for destructive operations.

Client information

Client Information

Run gemini to enter the interactive CLI, then run the /about command.

> /about
About Gemini CLI                              │
│                                               │
│ CLI Version     0.5.5                         │
│ Git Commit      b7ece4ee                      │
│ Model           gemini-2.5-pro                │
│ Sandbox         no sandbox                    │
│ OS              linux                         │
│ Auth Method     OAuth    

Login information

Google Account

Anything else we need to know?

This enhancement could be implemented using the existing ShellConfirmationDialog component to ensure UI consistency.

Related Issue and PR

#2401 #5614

YOLO Mode

  • --yolo:
    • Enables YOLO mode, which automatically approves all tool calls.
  • --approval-mode <mode>:
    • Sets the approval mode for tool calls. Available modes:
      • default: Prompt for approval on each tool call (default behavior)
      • auto_edit: Automatically approve edit tools (replace, write_file) while prompting for others
      • yolo: Automatically approve all tool calls (equivalent to --yolo)
    • Cannot be used together with --yolo. Use --approval-mode=yolo instead of --yolo for the new unified approach.
    • Example: gemini --approval-mode auto_edit

samucodesh avatar Sep 21 '25 02:09 samucodesh

This is a bug report about the /chat delete command lacking a confirmation step, which can lead to accidental data loss. This is a significant usability issue affecting a core interactive feature. The user also noted that this might be a good first issue as there is an existing component that can be used.

gemini-cli[bot] avatar Sep 21 '25 02:09 gemini-cli[bot]

/assign

drph4nt0m avatar Sep 23 '25 17:09 drph4nt0m

👋 @drph4nt0m, you've been assigned to this issue! Thank you for taking the time to contribute. Make sure to check out our contributing guidelines.

gemini-cli[bot] avatar Sep 23 '25 17:09 gemini-cli[bot]

I'm following up on this issue to report that it persists in the latest version. The /chat delete command still executes immediately without any confirmation prompt, which remains a significant risk for accidental data loss.

Updated Information for reference:

About Gemini CLI                                                                                             │
│                                                                                                              │
│ CLI Version                           0.21.3                                                                 │
│ Git Commit                            d0cdeda00                                                              │
│ Model                                 auto-gemini-3                                                          │
│ Sandbox                               no sandbox                                                             │
│ OS                                    linux 

samucodesh avatar Dec 21 '25 17:12 samucodesh

Hello! As part of our effort to keep our backlog manageable and focus on the most active issues, we are tidying up older reports.

It looks like this issue hasn't been active for a while, so we are closing it for now. However, if you are still experiencing this bug on the latest stable build, please feel free to comment on this issue or create a new one with updated details.

Thank you for your contribution!

gemini-cli[bot] avatar Dec 28 '25 00:12 gemini-cli[bot]