claude-code - 💡(How to fix) Fix [BUG] Ctrl+C and Ctrl+Shift+C silently clear prompt input with no confirmation or recovery

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

Error Messages/Logs

None. The clear is silent — no error, no warning, no echo of the discarded content.

RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • 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+C is the universal copy shortcut in GUI applications.
  • Ctrl+Shift+C is 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

  1. Open Claude Code in any standard terminal.
  2. Type several lines into the prompt — enough that retyping would be costly.
  3. With no text selected, press Ctrl+C. (Alternatively, Ctrl+Shift+C.)
  4. 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

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [BUG] Ctrl+C and Ctrl+Shift+C silently clear prompt input with no confirmation or recovery