Feature request: Improve Ctrl+R history search with fuzzy matching like fzf

Open 💬 0 comments Opened May 7, 2026 by Nngxu

2026-05-09 Update

I think this request could be generalized beyond only Ctrl+R.

The same fuzzy matching behavior would also be useful in other Codex CLI surfaces where the user needs to search or match existing items, for example the resume session picker and any other TUI selector that filters commands, sessions, prompts, file paths, or previous inputs.

What variant of Codex are you using?

CLI

What feature would you like to see?

I would like Ctrl+R in Codex CLI to behave more like fuzzy history search in zsh/fzf or command palette in vscode .
In my normal zsh setup, Ctrl+R is bound to fzf-history-widget, which lets me type a few characters and fuzzy-match against previous commands. This makes it very fast to find and reuse commands even when I only remember part of the command.( See the video below.)
In Codex, the current Ctrl+R history experience feels less useful because it does not provide the same fast fuzzy-search workflow.

https://github.com/user-attachments/assets/3ccbc269-ec6a-4cc1-a6ba-ef1b62ce418b

https://github.com/user-attachments/assets/9ef62424-8dd2-450c-905d-49f47848980d

Expected behavior

When pressing Ctrl+R, Codex should open an interactive command/history search UI where I can:

  • Type partial text and fuzzy-match previous commands
  • Match commands by substrings, not just prefixes
  • Navigate results with arrow keys
  • Press Enter to insert the selected command back into the input
  • Press Esc to cancel and return to the previous input
Why this matters

Codex sessions often involve repeated shell commands, test commands, file paths, and prompts. A good fuzzy history search would make it much faster to reuse previous commands without scrolling or manually retyping them.

Environment

codex: 0.128.0
Platform: MacOS

Additional information

_No response_

View original on GitHub ↗