interactive history search
Resolved 💬 1 comment Opened Aug 23, 2025 by mkusaka Closed Apr 12, 2026
What feature would you like to see?
I would like to request an interactive history search feature for the Codex CLI, similar to the Ctrl+R functionality in bash/zsh shells. This would allow users to quickly search and reuse previous prompts.
Feature Description
Implement an interactive reverse search through prompt history:
- Trigger: Press
Ctrl+Rto enter history search mode - Search: Type to search through previous prompts (fuzzy matching)
- Navigate: Use
Ctrl+Rrepeatedly to cycle through matches,Ctrl+Sfor forward search - Select: Press Enter to use the selected prompt, Escape to cancel
- Edit: Arrow keys to exit search mode and edit the selected prompt before submitting
User Experience
- Entering search mode:
``': _
> [Ctrl+R pressed]
(reverse-i-search)
```
- Searching:
``refactor': refactor this function to use async/await
(reverse-i-search)
```
- Multiple matches: Press
Ctrl+Ragain to cycle through older matches
Implementation Details
- Store prompt history persistently (local file or database)
- Implement fuzzy/substring matching algorithm
- Display match with highlighting of matched substring
- Support for:
- Case-insensitive search
- Multi-word search terms
- Configurable history size limit
- Optional: frecency-based sorting (frequency + recency)
Are you interested in implementing this feature?
No, but I'm happy to test and provide feedback.
Additional information
_No response_
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗