Platform Guides
How to Search Your Claude Code Conversation History
Claude Code splits your history across the terminal, VS Code, and the desktop app. Here is where sessions are stored, how to search them, and a faster way to search every one by keyword.
Claude Code keeps every session on your machine, but your history is split up — the terminal, the VS Code extension, and the desktop app each keep their own, and every session is scoped to the project folder you ran it in. Each of those apps lets you search and resume its own sessions, so the friction is not that search is missing — it is that no single search spans all three surfaces, let alone the AI chats you have in your browser. This guide covers exactly where your sessions live, how to search them, and the fastest way to search all of them — and your web chats — from one place.
Pick the task you actually have
| I want to... | Guide |
|---|---|
| Understand where sessions are stored on disk | Where Does Claude Code Store Conversation History? |
| Resume a session I was working in | How to Resume an Old Claude Code Session |
| Find one specific old session I can't place | Find an Old Claude Code Conversation Fast |
| Search across every session by keyword | Search every session with LLMnesia below |
Why Claude Code history is scattered
Claude Code stores your work as sessions, one per conversation, written to disk as you go. That part is good — nothing is trapped on a server, and your history survives as long as the files do.
The catch is that your history is fragmented. The terminal CLI, the VS Code extension, and the desktop app each keep their own session history, and every session is filed under the project folder you ran it in. Each app gives you tools to search and reopen its own sessions:
claude --resume(or-r) opens a picker of your saved sessions with a search mode to filter the list — pressCtrl+Ato widen it to every project on the machine — and lets you reopen one.claude --continue(or-c) jumps straight back into the most recent session in the current directory./resumedoes the same from inside a running session, and the desktop app lists your sessions in a sidebar you can search.
So each surface can search its own history. What none of them do is pull the terminal, VS Code, and the desktop app into one search — and none of them reach the AI chats you have in your browser. If the session you want is in a different app, or you are not sure which one you used, you are back to checking each place in turn.
Method 1: Resume from the picker
If you can recognise the session in the picker, this is the fastest path:
- Run
claude --resume(orclaude --continueto jump straight to the most recent session in the current directory). - Filter the list with a search term if you need to.
- Pick the session and continue it.
Works well for: sessions you can recognise at a glance.
Breaks down when: you are looking for a session by something that was said inside it, rather than by the session itself.
Method 2: Search the session files with ripgrep
Because every session is a plain .jsonl file under ~/.claude/projects, you can search their contents directly. ripgrep (rg) is ideal because it reads nested folders fast:
rg -l "the phrase you remember" ~/.claude/projects
That returns the session files whose text contains your phrase. Add -i for case-insensitive matching, and drop the -l to see the matching lines in context. To find which project a file belongs to, look at its parent folder name — Claude Code names each project folder after the directory you ran it in.
Works well for: a distinctive phrase you are sure appeared in the conversation.
Breaks down when: you are matching against raw JSONL, so results are mixed in with tool calls, file contents, and metadata rather than a clean transcript — and you still have to open the file to read the exchange around your match.
Method 3: Search every session with LLMnesia
Methods 1 and 2 make you either remember the project or wade through raw files. LLMnesia removes both problems: it indexes your Claude Code sessions locally and makes them searchable by keyword from one box — no matter which project or which day they came from.
Point it at your ~/.claude/projects folder once, or install the optional background helper and it keeps your sessions in sync on its own: start a new Claude Code session and it turns up in search without you doing anything. Type a phrase you remember — a function name, an error message, a decision you talked through — and jump straight to that session. From a result you can reopen it in the Claude Desktop app, or copy a ready-to-run terminal command that resumes that exact session in the right project folder.
Because the same index also covers ChatGPT, Claude, Gemini, and your other AI tools, one search spans your whole AI history — the web chats and the terminal sessions together. It indexes only your prompts and Claude's replies (not file reads, shell commands, or tool output), and everything stays on your device.
What to remember
Claude Code's own search stops at the edge of each app — the terminal, VS Code, and the desktop app each search only their own sessions, and none of them see your web chats. For a session you can place in one app's picker, that is all you need. To search across every surface at once — or to match a session by a phrase from it alongside your ChatGPT and Claude web chats — you need one index over all of it: ripgrep over ~/.claude/projects when you know the exact phrase and the project, or a tool like LLMnesia when you don't.
Frequently asked
Can you search Claude Code conversation history?
Yes, but within each app separately. The CLI resume picker (claude --resume) has a search mode that filters your session list, the VS Code extension and the desktop app each let you search their own session history, and you can grep the raw session files in ~/.claude/projects yourself. What none of them do is search across all three surfaces at once, or alongside the AI chats you have in your browser. A tool like LLMnesia indexes every Claude Code session and your web chats into one searchable box.
Where does Claude Code store its history?
Claude Code writes each session to a .jsonl file under ~/.claude/projects, in a subfolder named after the project directory you ran it in. One file holds one session's messages. This is why history is scoped per project — the sessions for one repo live in that repo's folder.
Does claude --resume search old conversations?
It opens a picker, not a search of your conversations. claude --resume (or -r) lists your saved sessions and lets you filter them with a search term, then reopen the one you pick — it is matching your session list to resume something, not searching the full text of what was said inside each conversation. To reopen the most recent session in the current directory without the picker, use claude --continue (or -c).
How do I find a Claude Code session from a different project?
Sessions are stored per project under ~/.claude/projects, and both claude --continue and claude --resume — even with a specific session ID — only see sessions for the directory you are currently in. To resume one from a different project, cd into that project first. If you don't know which project it was, search the files by content with ripgrep, or use LLMnesia, which indexes every session and hands you a command that resumes it in the right folder.
Does LLMnesia search Claude Code sessions?
Yes. LLMnesia indexes your local Claude Code sessions — from the terminal, the VS Code extension, and the desktop app — into the same search as your ChatGPT, Claude, and Gemini chats. It indexes only your prompts and Claude's replies, not file reads, commands, or tool output, and it all stays on your device.
Sources
Related reading
Search all your AI conversations in one place — LLMnesia indexes your ChatGPT, Claude, Gemini, Grok, and 10+ other AI chats locally on your device. No account, no cloud, completely private. Install LLMnesia free →