Question: how can you find the exact session you are looking for, among hundreds of them? I had a look at my ~/.claude/projects/*/ and I couldn't even find my last session.

I had exactly this problem and didn’t see anything good out there (Claude —resume only searches session names and auto-created titles) so I got a tool built that uses a Rust/Tantivy full text search index. It’s part of the aichat command suite, called “aichat search”:

https://pchalasani.github.io/claude-code-tools/tools/aichat/...

It brings up a nice TUI for filtering and further actions. There’s also a —json flag so agents can use it as a CLI search tool to find context about any past work. There’s a plugin that provides a corresponding session-searcher agent that knows to use this tool to search sessions.

I have hundreds/thousands of past sessions and this has been a life saver; I can just ask the main agent, “use the session searcher agent to get the details of how we built the tmux-cli tool so we can add some features”.

Ha, good question. Short answer: I often let Claude Code find it.

Sessions are grouped by the folder where you ran Claude Code (e.g. ~/.claude/projects/Users-<user>-<path>), so if you don’t run everything from the same directory, it’s usually easy to narrow down.

They’re also plain JSONL files, so grep works well if you remember part of a prompt.

That said, it might be nice for claude-replay to add a helper command to list or search recent sessions.

In your last session, use "/status" to show your session_id, then find your session file in "~/.claude/projects/[your_project]/[session_id].jsonl"