Arrow key navigation trapped in slash command autocomplete menu
Resolved 💬 3 comments Opened Nov 8, 2025 by hoiung Closed Nov 12, 2025
Bug Description
When typing a message and accidentally pressing the up arrow key (which is positioned near Enter), the slash command autocomplete menu appears (e.g., /clear with options /start or /compact). The arrow keys then become trapped in a loop cycling between the autocomplete options, making it impossible to navigate back down to the message being typed.
Steps to Reproduce
- Start typing a message in Claude Code CLI
- Accidentally press up arrow (easy to do since it's near Enter key)
- Slash command autocomplete appears (e.g.,
/clearwith sub-options) - Try pressing down arrow to return to the message being typed
- Bug: Arrow keys are now trapped cycling between
/clearand/compactoptions - Cannot escape back to the original message
Expected Behavior
When the autocomplete menu appears:
- Down arrow should allow navigation OUT of the menu back to the typed message
- ESC key should dismiss the menu and return to message input
- There should be a way to exit the autocomplete loop
Current Behavior
- Arrow down only cycles between autocomplete options (e.g.,
/clear↔/compact) - No way to navigate back to the message being typed
- Keys are trapped in the autocomplete menu
- User loses access to their partially typed message
Impact
- High frequency: Easy to trigger accidentally (up arrow near Enter)
- Complete blocker: Cannot recover the typed message
- Lost work: Must abandon partially typed messages
- Severe UX issue: Breaks basic text editing expectations
UI/UX Problems
- Poor key placement awareness: Up arrow very close to Enter invites accidents
- No escape mechanism: Once in autocomplete, no way out except completing/canceling command
- Navigation capture: Arrow keys commandeered by autocomplete without release
- No visual feedback: Unclear that you're "trapped" in a mode
Suggested Fixes
- Allow down arrow to exit autocomplete menu when at the last option
- Add ESC key to dismiss autocomplete and return to message
- Add a "back to input" option in the menu
- Don't trigger slash commands from up arrow - only from typing
/ - Show clearer visual indication of being "in" autocomplete mode
Environment
- Platform: Windows (win32)
This is a critical navigation/input mode issue that needs immediate attention.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗