You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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+R to enter history search mode
Search: Type to search through previous prompts (fuzzy matching)
Navigate: Use Ctrl+R repeatedly to cycle through matches, Ctrl+S for 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:
(reverse-i-search)`refactor': refactor this function to use async/await
Multiple matches: Press Ctrl+R again 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
Activity
PanJason commentedon Mar 31, 2026
Hi I have implemented here #16249. Feel free to use it. I will keep rebasing until codex allows a pr over it