[BUG] Ctrl+C and Ctrl+Shift+C silently clear prompt input with no confirmation or recovery
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
When the prompt input buffer is non-empty, pressing either Ctrl+C or Ctrl+Shift+C silently discards the entire buffer. There is no confirmation, no echo to scrollback, no warning, and no way to recover what was typed. A single accidental keypress destroys arbitrarily large amounts of carefully composed work.
Both keystrokes are strong muscle-memory copy shortcuts:
Ctrl+Cis the universal copy shortcut in GUI applications.Ctrl+Shift+Cis the standard copy shortcut in many terminals (gnome-terminal, Konsole, Windows Terminal) and is also the browser devtools "select an element" shortcut.
Users reach for one or the other reflexively, expecting a copy - or mistake which window has focus - and lose their work instead.
What Should Happen?
A non-empty input buffer must never be cleared without confirmation. Acceptable forms of confirmation:
- An inline prompt ("Discard N lines? y/N"), or
- A repeat-press confirmation: a single press shows a warning hint, only a second press within a short window commits the clear.
After the clear, the action must be undoable via Ctrl+Z, and an onscreen hint at the moment of clearing must say so (e.g. "Input cleared — press Ctrl+Z to restore"). Without the hint the undo is undiscoverable.
The two requirements pair: confirmation prevents accidents the user notices in time; undo plus hint catches the ones that slip through.
Error Messages/Logs
None. The clear is silent — no error, no warning, no echo of the discarded content.
Steps to Reproduce
- Open Claude Code in any standard terminal.
- Type several lines into the prompt — enough that retyping would be costly.
- With no text selected, press
Ctrl+C. (Alternatively,Ctrl+Shift+C.) - Observe: the input buffer is cleared. Typed content is gone. No confirmation, no echo, no recovery.
Reproduced in Windows Terminal, cmder, and the integrated terminal of a JetBrains IDE.
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.142 (Claude Code)
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
Windows Terminal
Additional Information
Related existing issues (different destructive targets, same class of bug — destructive keybinding with no confirmation):
- #55590
- #52377
This issue has 6 comments on GitHub. Read the full discussion on GitHub ↗