[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
Showing cached comments. Read the full discussion on GitHub ↗
12 Comments
I face the same problem on Mac OS as well. I spend 15 minutes writing a long prompt, and when I'm doing Control+V to paste an image accidentally, I hit Ctrl+C and the entire thing goes away.
This is one of the most painful keyboard problems that I face. This is one of the most painful keyboard problems that I face. If Possible I should be able to at least disable Ctrl+C for this behavior.
seeing similar issues
It's also frustrating that any active tool calls are stopped when attempting to clear the prompt. These should really have separate key bindings.
I was sure it's a glitch, but after hitting it for the 10th time I decided to search for the culprit.
Please make it stay in history, so arrow up brings the input back, really frustrating to lose the long prompt you've been writing for past 10 minutes or so.
why new updates bring silly features instead of better ones
Same problem on Linux, this is not a
platform:windowsbug. Please update labels, I lost a LOT of work because of this. This shouldn't be that hardMonths later and Anthropic hasn't bothered to even acknowledge this issue or put it in their backlog. It's mind-blowing how an accidental keystroke can completely wipe out an entire prompt without any safety net or warning.
Configuration I'm using while the issue is open (Ctrl+_ and Ctrl+Shift+- are captured by the terminal)
(And of course there's no redo)
This is the single biggest annoyance that really gets in the way of working flow with CC. At this point I have to use CC with an open editor for building prompts. CTRL-C is so hard wired at this point for in-app copying and in-bash SIGINT that having it do something different in CC feels like a real bug or just terrible TUI design oversight.
Lost an hour of thinking and writing, because I hit Ctrl C instead of Ctrl V 😢
This really hurts!! What an anti-feature!
I know right. On Ctrl+U it shows Ctrl+Y as undo. A easy fix is to just allowing Ctrl+Y here as well. but current the input is just gone. all the thinking and writing is just lost.
Honestly as the prompt starts getting long I start getting nervous about accidentally hitting Ctrl + C and losing it. so I have resorted to writing the prompt on the side in a file and just pasting it when I'm ready to send it