[FEATURE] Allow searching conversation history when using `claude --resume`

Resolved 💬 3 comments Opened Oct 1, 2025 by dgarlitt Closed Oct 5, 2025

Preflight Checklist

  • [x] I have searched existing requests and this feature hasn't been requested yet
  • [x] This is a single feature request (not multiple features)

Problem Statement

I often have a lot of conversation history and it is difficult to identify the conversation that I want to resume based on the one-line prompts when using claude --resume as the conversation can take detours and sometimes several conversations have similar one-liners to each other in the prompt.

Proposed Solution

It would be nice to be able to search the conversation history, possibly similar to using / in linux to search man pages, to help narrow down the conversation to resume.

Alternative Solutions

I have a script that claude helped me create that will take the current working directory and convert it into a dash-delimited name that matches the directory name under which claude stores session conversations for the current project:

Example:
if pwd returns /Users/my.name/Work-Projects/my-fancy-project, the script converts it to the directory path /Users/my-name/.claude/projects/-Users-my-name-Work-Projects-my-fancy-project

Then the script searches through the files in that directory using provided keywords and returns the filenames (as sessionId) and the date the file was last modified and sorts by most recent:

Example:

> ~/.scripts/search-claude-sessions.sh "big" "red" "machine"
2025-10-01 14:51:34  a2404df5-d39c-4af0-850b-b303c2d08edd
2025-09-29 18:40:03  fe0288cc-977e-4280-945c-8c1696750ea8
2025-09-29 17:41:26  28a08b8e-0462-493e-8887-efef6879a77c

Priority

Medium - Would be very helpful

Feature Category

CLI commands and flags

Use Case Example

Example scenario:

  1. I'm working on a project
  2. I want to resume a conversation that I recall dealt with "CORS headers" and "allowed_lists" but it's not apparent which conversation it was from the list provided when typing claude -r
  3. With this feature, I could run something like claude -r --search "search" "terms" or claude -r and then type / to search through the conversations for the one I want. Ideally I could also fork the session from the menu after searching if I wanted to.
  4. This would help me find the conversation that has context for what I want to continue working on

Additional Context

_No response_

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗