[BUG] Alt+Delete deletes entire line and Ctrl+Delete only deletes 1 char in chat input (Linux, kitty terminal)

Status Open
Reported on v2.1.220
Maintainer reply None cached
Activity 1 comment · opened Jul 27, 2026

Description

In the chat input's text editing, word-delete keybindings behave incorrectly:

  • Alt+Delete deletes the entire line (expected: delete one word forward, like kill-word in readline/fish)
  • Ctrl+Delete deletes only a single character (expected: delete one word/token forward)

For reference, Ctrl+Backspace and Alt+Backspace work correctly (both delete a whole word backward), so the bug is specific to the forward-delete side.

This looks related to #77457 (kitty CSI-encoded modified key being misinterpreted as "delete to end of line" instead of "delete word") and #80285 (Ctrl+Delete word-delete missing on Windows Terminal), but reproduced here on Linux with the kitty terminal + fish shell, and with the additional Alt+Delete-whole-line symptom which isn't described in either.

Environment

  • OS: CachyOS (Arch-based) Linux, kernel 7.1.4-1-cachyos
  • Terminal: kitty 0.48.0
  • TERM: xterm-kitty
  • Shell: fish 4.8.1
  • Claude Code version: 2.1.220

Steps to reproduce

  1. Open Claude Code in kitty terminal on Linux
  2. Type a multi-word line in the chat input, e.g. un deux trois
  3. Place cursor before un
  4. Press Ctrl+Delete → only u is deleted (expected: un deleted)
  5. Retype the line, place cursor before un
  6. Press Alt+Delete → the entire line is deleted (expected: only un deleted)

Additional notes

We verified this is not a kitty or fish misconfiguration — fish_key_reader and bind both confirm kitty sends correctly distinguishable key events (ctrl-delete, alt-delete) and fish's own bindings for these (kill-token, kill-word) are set up correctly for word-level deletion in the fish shell itself. The bug only reproduces inside Claude Code's own chat input, which has no dedicated rebindable action for word-delete in ~/.claude/keybindings.json (confirmed no chat:deleteWord* action exists), so this can't be worked around via keybindings config.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗