cmd+backspace in multi-line chat input deletes all lines instead of current line

Status Fixed / completed
Maintainer reply ✓ Yes — mhegazy
Activity 7 comments · opened Apr 17, 2026 · closed Apr 18, 2026
💡 Likely answer: A maintainer (mhegazy, contributor) responded on this thread — see the highlighted reply below.

Description

When the chat input contains multiple lines, pressing cmd+backspace deletes the entire input (all lines) instead of only the current line, which is the standard macOS behavior in virtually every other text input.

Expected behavior

cmd+backspace should delete only the current line (from cursor to start of line), matching native macOS text editing conventions.

Actual behavior

cmd+backspace clears the entire multi-line input, wiping work from other lines.

Steps to reproduce

  1. Open Claude Code in a macOS terminal
  2. In the chat input, type several lines (use ctrl+j for newlines)
  3. Place cursor on one of the lines
  4. Press cmd+backspace
  5. Observe that all lines are deleted, not just the current one

Workaround

None via keybindings — the available chat actions only include chat:clearInput (full clear), with no line-level delete primitive to remap.

Environment

  • macOS (Darwin 25.2.0)
  • Shell: zsh
  • Claude Code CLI

View original on GitHub ↗

7 Comments

github-actions[bot] · 4 months ago

Found 1 possible duplicate issue:

  1. https://github.com/anthropics/claude-code/issues/49313

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

nosnaj · 4 months ago

been burned by this so many times today!!!

robsonferr · 4 months ago
been burned by this so many times today!!!

Same here. 😡

bgoewert-seiler · 4 months ago

Also Ctrl+U. Very annoying when this is a standard command specifically to delete lines. Just learned about Ctrl+Y to restore deleted prompt, but I've had to re-type thorough responses. We at least need a chat:clearLine to change the binding back and/or revert the default binding back and keep chat:clearInput for those that for some reason wanted this.

bgoewert-seiler · 4 months ago

Dupe #49313
Apparently fix incoming

mhegazy contributor · 4 months ago
github-actions[bot] · 4 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.