Add a confirmation prompt before /compact and /clear
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
Both /compact and /clear execute the instant they're entered, with no confirmation step. Both are destructive: /clear wipes the conversation, and /compact discards the raw context in favour of a summary. A single fat-fingered keystroke or a stray click (easy in the VS Code extension's chat panel) can throw away a long, context-rich session with no warning and no obvious way back.
Impact
When it happens mid-task, it's a genuine "stomach drop" moment. The rewind function can recover it, but rewind isn't discoverable in the heat of the moment, and a new user wouldn't know it exists. The cost of an accidental fire is high; the cost of a confirm gate is one keystroke.
Proposed Solution
A simple confirmation gate before either command runs, for example:
This will clear/compact the current conversation. Continue? (y/N)
Default to No so an accidental Enter is a safe no-op.
Nice-to-haves
A settings flag to disable the gate for power users who want the current instant behaviour (e.g. "confirmDestructiveCommands": false).
Show the gate in the VS Code extension as a small inline confirm button, not just a CLI y/N.
Optionally surface the rewind hint in the same prompt ("you can rewind if you change your mind"), so the recovery path is visible exactly when people need it.
Alternative Solutions
Getting thinner fingers is the only other one I can see.
Priority
Medium - Would be very helpful
Feature Category
Interactive mode (TUI)
Use Case Example
User story: As someone deep in a long working session, I want a confirmation step before /compact and /clear so that a single accidental keystroke or click can't destroy my context without warning.
Scenario: I'm three hours into a session with a large, hard-won context: research, file edits, decisions, the lot. I mean to type a normal message, but muscle memory or a fat-fingered keystroke sends /compact (or in the extension, a stray click lands on the command). It fires instantly. The raw context is gone, replaced by a summary, with no "are you sure?" and no visible way back. In that moment I don't remember that rewind exists, so it feels unrecoverable, and the session's momentum is broken either way.
With the gate: the same keystroke surfaces This will compact the current conversation. Continue? (y/N), defaulting to No. I hit Enter or Escape, nothing happens, and I carry on. The prompt also reminds me rewind is available, so even if I did confirm by mistake, I'd know the recovery path. One cheap confirm turns a stomach-drop into a non-event.
Additional Context
_No response_
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗