[Bug] Command delete removes all prompt lines instead of current line only

Resolved 💬 20 comments Opened Apr 16, 2026 by whswee-newswav Closed Apr 18, 2026
💡 Likely answer: A maintainer (mhegazy, contributor) responded on this thread — see the highlighted reply below.

Bug Description
When i have multiple lines on my prompt, clicking command delete will delete all lines instead of just the line i am in.

Environment Info

  • Platform: darwin
  • Terminal: vscode
  • Version: 2.1.111
  • Feedback ID: e9daaa46-7d5b-4180-bc8e-f3729c96f63c

Errors

[{"error":"Error: NON-FATAL: Lock acquisition failed for /Users/waihoowswee/.local/share/claude/versions/2.1.111 (expected in multi-process scenarios)\n    at Kd_ (/$bunfs/root/src/entrypoints/cli.js:2748:2177)\n    at qe6 (/$bunfs/root/src/entrypoints/cli.js:2748:1257)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-16T17:19:41.539Z"}]

View original on GitHub ↗

20 Comments

github-actions[bot] · 3 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/7967
  2. https://github.com/anthropics/claude-code/issues/49317
  3. https://github.com/anthropics/claude-code/issues/43020

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

TyBoyes · 3 months ago

Same regression on macOS + Ghostty, Claude Code 2.1.111 (updated today from 2.1.110, which did not have this). Cmd+Backspace deletes the entire multi-line prompt instead of just the current line.

TyBoyes · 3 months ago

Not a duplicate of any of the three flagged issues:

  • #7967: Cursor IDE specific; opposite symptom (Cmd+Delete does nothing). Closed, v1.0.120.
  • #49317: 2.1.111 regression, but about Ctrl+W and Ctrl+U; different key bindings.
  • #43020: Ghostty, but about Option+Delete; different key.

This report is specifically Cmd+Backspace deleting the entire multi-line prompt on v2.1.111, reproducible on macOS across at least two terminals (VSCode per the original report; Ghostty per my confirming comment above). Regression introduced in v2.1.111; v2.1.110 behaves correctly.

Likely shares a root cause with #49317 (2.1.111 keybinding refactor mis-mapping several delete actions to delete-all); worth tracking separately since the affected key and user-visible behavior differ.

neverdot · 3 months ago

I'm also seeing this issue. Very frustrating to lose an entire prompt...

banagale · 3 months ago

This is a bit frustrating because I lost a detailed prompt due to this.

A lighter pattern would have been to display a note to users that Ctrl-Y would restore the unexpectedly cleared prompt. I had to dig through release notes and did not find it until I had repeated the work.

The control-u behavior change with no advance warning and no "first two times you get a tip about about this" was not cool.

This is the second unannounced force change to line clearing behavior in a few months. Previously ctrl-c behaved differently, that change also happened with no warning.

Would the team please try to come up with a way to reliably communicate intent around keyboard hotkeys? We are keyboard jockeys, its a thing to mess with hotkeys.

Either communicate plans to change in advance and provide reasonable and immediately visible escape hatch i.e. ctrl-y, when this happens?

Would the team also please explain how customers should clear one line at a time now?

You did not explain how to replace the control-u hotkey in the release notes.

chancegraff · 3 months ago

I've lost multiple prompts from this. Please don't change keyboard shortcuts willy-nilly. I'm an old dog and it takes me time to learn new tricks. At least let me perform an undo so I can get back what I lost!

bballeysark · 3 months ago

I'm experiencing the same issue. I'm on MacOS + iTerm2, using Claude Code v0.2.11.

noejon · 3 months ago

+1 on this one.

Quite annoying to write prompts and see it all go, especially as there is no cmd|ctrl + z available.

kym6464 · 3 months ago

This is especially frustrating because cmd-backspace is essentially a universal shortcut to delete the current line on MacOS. It wasn't exclusive to Claude Code to begin with, so un-learning it is not simple given that I still use it when editing text in other applications.

ironerumi · 3 months ago
Ctrl-Y

saved the day

ruirong-lifegame · 3 months ago

same here on 2.1.112, macOS, Cursor terminal. tried adding "ctrl+u": null under Chat in ~/.claude/keybindings.json and it didn't do anything — looks like it's hardcoded, not something users can override.

thomasballinger · 3 months ago

Fix coming in tomorrow's build! I didn't realize so many terminals map Cmd-backspace to ctrl-u.

TedYav · 3 months ago

Same here!

smlparry · 3 months ago
that Ctrl-Y would restore the unexpectedly cleared prompt.

Huge! This issue is very frustrating, but glad I learnt about this!

robsonferr · 3 months ago
Ctrl-Y would restore the unexpectedly cleared prompt

Wow! Thanks, didn't know about this. Save me a lot just now!

espressoplease · 3 months ago

PLEASE RESOLVE - This has made me the most angry I've been with CC

Anfed-2030 · 2 months ago

+1 confirming this on macOS / Ghostty.

Environment:

Claude Code 2.1.113
macOS (Darwin 25.3.0)
Ghostty 1.3.1
CLAUDE_CODE_NO_FLICKER=1 (fullscreen renderer enabled)
Repro: In the prompt box, type a multi-line message (or even a single long paragraph), then press cmd+delete. Entire buffer is wiped instead of just the current line.

This is a real daily-driver papercut — deep muscle memory from every other macOS text field (where cmd+delete deletes to start-of-line). Losing a whole drafted prompt to a reflex is painful.

Workaround I'm using until this lands: disabling CLAUDE_CODE_NO_FLICKER entirely to revert to the classic renderer, where cmd+delete behaves correctly.

Would really love a fix so I can turn the flicker-free renderer back on.

TedYav · 2 months ago

Heads up -- ctrl + y (NOT cmd + y) will bring back text if you accidentally do this.
Also it seems to be fixed for me in 2.1.113

mhegazy contributor · 2 months ago

Fixed in https://github.com/anthropics/claude-code/releases/tag/v2.1.113. Ctrl+U is back to readline-standard "delete to start of current line." We also added a Ctrl+Y to paste deleted text hint after a kill so accidental deletes are recoverable. If you're still seeing this on ‚2.1.113, please run claude --version to confirm and reopen with the output.

github-actions[bot] · 2 months ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.