[BUG] Readline `reverse-i-search` (aka C-r) is broken
Resolved 💬 3 comments Opened Jan 28, 2026 by mattkeenan Closed Feb 1, 2026
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 using reverse-i-search (i.e. Ctrl-r) you can't then use the cursor keys to edit the text of the prompt; forcing you to either accept either all or none of the text from the search.
What Should Happen?
After finding the text of the prompt from the prompt history it should be possible to edit the prompt in the same way that Readline does.
Error Messages/Logs
N/A; no error and also doesn't work.
Steps to Reproduce
- at empty prompt type C-r to invoke
reverse-i-search(iteratively search the prompt history in reverse order) - type some text to find any entry in the prompt history
- try to use the arrow keys to move the cursor / edit the prompt from the search (which should allow you to edit but in fact does nothing)
Claude Model
Sonnet (default)
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.22 (Claude Code)
Platform
Anthropic API
Operating System
Ubuntu/Debian Linux
Terminal/Shell
Xterm
Additional Information
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗