Skip to main content

How to Search History in Claude Code

Claude Code v2.0.0 introduced reverse history search with Ctrl+R, enabling instant access to previous queries through text-based matching. This feature streamlines workflows by eliminating the need to retype complex or lengthy prompts.



How to Use It

Press Ctrl+R during any Claude Code session to activate history search, then start typing to find matching previous queries:

Ctrl+R

Search Workflow:

  1. Press Ctrl+R to enter history search mode
  2. Begin typing any part of a previous query
  3. The input box populates with the closest matching previous query
  4. Continue typing to refine the match or press Enter to use the populated query

The matching algorithm works like Ctrl+F text search. It performs plain text matching without interpretation or intelligence, searching for exact character sequences in your command history.


See Also: How to Suspend Claude Code|Terminal Controls|Claude Code v2.0.0