[BUG] Home/End in multi-line prompt input jump to buffer start/end, not line start/end; Chat context has no line-navigation actions to rebind

Status Open
Reported on v2.1.273
Maintainer reply None cached
Activity 0 comments · opened Sep 17, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet (#86450 covered the VS Code extension chat panel on macOS and was closed as inactive; #67287 was the Down-arrow-to-end-of-line regression; neither covers the terminal input editor's End/Home keys)
  • [x] This is a single bug report
  • [x] I am using the latest version of Claude Code (2.1.273)

What's Wrong?

In the terminal (CLI) input editor, with a multi-line prompt being composed, pressing End moves the cursor to the end of the entire input buffer rather than the end of the current logical line. Home behaves the same way toward the start of the buffer. Every other editor and readline-style input on the system treats Home/End as line-scoped.

Ctrl+E / Ctrl+A do move to the end / start of the current logical line, as documented in the interactive-mode reference, so the line-scoped motions exist — they are just not what the Home/End keys map to.

I also could not remap the keys: the keybindings reference lists home / end as recognized keystrokes and binds them in the Scroll, Select, and text-selection contexts (scroll:top, scroll:bottom, select:first, select:last, selection:extendLineStart, selection:extendLineEnd), but the Chat context exposes no cursor-navigation actions (nothing like chat:lineStart / chat:lineEnd), so ~/.claude/keybindings.json cannot fix it.

Expected

Home/End move to the start/end of the current logical line in multi-line input (matching Ctrl+A / Ctrl+E), or at least the Chat context exposes line-start / line-end / buffer-start / buffer-end actions so the keys can be bound in keybindings.json.

Steps to Reproduce

  1. claude in a terminal (Linux, tmux; also reproduced from a macOS terminal over SSH).
  2. Type a line, Shift+Enter (or \ + Enter) for a second line, type more, then Up to move the cursor into the first line, and press Home or End.
  3. The cursor lands at the start / end of the whole buffer instead of the current line.

Environment

  • Claude Code 2.1.273
  • Linux (NixOS), bash, inside tmux; terminal reports home / end normally (nvim and bash line-scope them as expected)
  • Not vim editor mode

View original on GitHub ↗