Desktop app (macOS): up-arrow history replaces the typed draft; Enter then loses it permanently, no way to opt out cleanly
Status Fixed / completed
Reported on v2.1.71
Maintainer reply None cached
Workaround ✓ Mentioned in description ↑
Activity 2 comments · opened Jul 27, 2026 · closed Aug 25, 2026
Summary
In the macOS desktop app's chat composer, pressing the up arrow while a draft is being written replaces the draft with a recalled history entry ("History N/N" / "Search history:" overlay). Pressing Enter at that point sends or executes the recalled entry and the original draft is permanently lost. Down arrow does NOT restore the draft in this version (contrary to the workaround noted in #53107). There is no setting to disable history recall.
This cost one user three long typed messages in a single day, plus one accidental re-send of an old message.
Environment
- Claude Code desktop app (macOS), CLI core 2.1.71
- macOS 15.7.4
Steps to reproduce
- Type a multi-line draft in the composer.
- Press the up arrow (e.g. intending to move the cursor up a line).
- The draft is replaced by a history entry; the overlay shows "History N/N".
- Press Enter (muscle memory, or intending to send the draft).
- The history entry is sent/executed. The draft is gone. Down arrow does not bring it back.
What makes it worse
- Up arrow is the single most natural key for cursor navigation in a multi-line text box. Overloading it with a destructive replace action turns normal text editing into a landmine.
- Unbinding
upin theChatcontext of~/.claude/keybindings.jsondoes stop the in-draft hijack, but it also removes cursor-up movement, because the same binding drives both. There is no way to keep cursor navigation and lose history. - With an empty composer, history recall on up arrow persists even with
"up": nullin the Chat context, so the unbind is only a partial opt-out. - Note: the desktop app honored the
Chatcontextupunbind in this version, which contradicts the "keybindings.json ignored in desktop app" status in #25087 / #48147 - possibly fixed since, or context-dependent.
Requested behavior
- Arrow keys should navigate text. Full stop. History recall should live only behind an explicit chord (Ctrl+R style) that cannot be hit while normally editing.
- A draft must never be silently replaced. If history is invoked, stash the draft and restore it on exit (Esc/down/cancel) - and never let Enter discard an unsent draft without it being recoverable.
- Provide a setting to disable history recall in the composer entirely.
Related
- #53107 (Cowork/Windows up-arrow hijack - same class of bug; its down-arrow workaround does not work here)
- #15901 (CLI prompt history loses draft)
- #25087 / #48147 (keybindings.json in desktop app)
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗