[BUG] Keyboard input shows raw focus event sequences (^[[O^[[I) in TUI menus on macOS
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
When pressing any key inside a Claude Code TUI menu (e.g. the memory menu),
keystrokes are not processed. Instead, raw terminal focus event sequences
^[[O^[[I appear as literal text in the menu, making keyboard navigation
impossible.
## Steps to Reproduce
- Open Claude Code in any terminal
- Trigger a TUI menu (e.g. /memory)
- Press any key to select an option
## Expected Behavior
The keypress selects the corresponding menu option.
## Actual Behavior
The input is not processed. Instead, ^[[O^[[I^[[O^[[I appears as
literal text in the menu display.
## Environment
- OS: macOS Darwin 25.4.0
- Terminals affected: VSCode integrated terminal, iTerm2
- Keyboard input works normally outside of Claude Code (e.g. TextEdit,
other CLI tools)
## Workaround
None for keyboard navigation. Mouse clicks work if the terminal supports
mouse input.
What Should Happen?
Claude code should accept keyboard input in command mode.
## Expected Behavior
The keypress selects the corresponding menu option.
## Actual Behavior
The input is not processed. Instead, ^[[O^[[I^[[O^[[I appears as
literal text in the menu display.
## Environment
- OS: macOS Darwin 25.4.0
- Terminals affected: VSCode integrated terminal, iTerm2
- Keyboard input works normally outside of Claude Code (e.g. TextEdit,
other CLI tools)
## Workaround
None for keyboard navigation. Mouse clicks work if the terminal supports
mouse input.
Error Messages/Logs
Steps to Reproduce
- Open Claude Code in any terminal
- Trigger a TUI menu (e.g. /memory)
- Press any key to select an option
Claude Model
Sonnet (default)
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.126
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
iTerm2
Additional Information
_No response_
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗