open source · cli · for claude code · opencode · hermes

Find any past
Claude CodeHermes AgentOpenCode conversation,
like it should.

claude-grep searches your entire Claude Code history. Type a phrase, watch every past session where it came up stream in, and resume the right one with a single keypress. grep + fzf for everything Claude Code has ever told you.

MIT licensed · a single Python script · also searches OpenCode + Hermes if installed
# install with Homebrew brew install coolcorexix/tap/claude-grep ccfind # then just run it
the problem

Your best work is buried in old chats.

You know you solved this exact thing a few weeks ago — in some Claude Code conversation, somewhere. But claude --resume only matches a session's title, never what was actually said inside. And history is fragmented per directory, so every pwd shows a different partial list. The fix you need is right there on disk, and completely unfindable. claude-grep reads those JSONL transcripts directly and makes all of it searchable — in milliseconds, with no index.

the demo

Type. Skim. Resume.

ccfind
features

Find it. Resume it. Fork it. Move it.

Live full-transcript search across every project and one-keypress resume — then branch any conversation or move it between coding agents, all without leaving the UI.

[rg]

Live, as you type

ripgrep narrows thousands of transcripts to candidates in milliseconds; only those get parsed for clean, highlighted snippets.

[txt]

Searches what was said

Your prompts, Claude's replies, and tool output — even matches buried inside a shell command surface via a raw fallback.

[⌃U]

Search only your words

Press Ctrl-U to match only what you typed — AI responses and tool output drop out of the results. Perfect when you remember your own phrasing but it echoes through a dozen replies. Or start with ccfind --user-only.

[↵]

One-keypress resume

Enter cds into the project and runs claude --resume on the exact session. You're back where you left off.

[⌖]

Sub-agent aware

Sub-agent transcripts aren't resumable, so claude-grep resolves them to their parent session — even across deleted worktrees.

[⌃B]

Branch any conversation

Press Ctrl-B instead of Enter to fork a session from any past message into a new one — like git checkout from a commit, but for AI chats. The original thread stays untouched.

[⌃X]

Port between agents

Press Ctrl-X on any OpenCode or Hermes session to convert it into a fresh, resumable Claude Code transcript — tool calls, reasoning, text and inline images carried over, with forkedFrom provenance. Move work between coding agents instead of starting over.

[∅]

No index, no daemon

Nothing runs in the background and there's nothing to rebuild. It reads the JSONL files Claude Code already writes.

[≡]

Deduped, newest first

One row per resumable conversation, most recent on top, capped so it stays instant no matter how much history you have.

multi-agent

One UI. Three agents.

If you also use OpenCode or Hermes, ccfind searches their conversation history alongside Claude Code's — auto-detected, tagged per source, and routed to the right agent's resume command on Enter. Install once, search everything.

[c]

Claude Code

JSONL transcripts under ~/.claude/projects/. Sub-agents auto-resolve to their resumable parent.

[h]

Hermes

Sessions under ~/.hermes/sessions/ and per-profile dirs. Resumes via hermes --resume.

[o]

OpenCode

SQLite database at ~/.local/share/opencode/opencode.db. Resumes via opencode --session.

the difference

claude-grep vs claude --resume

claude --resume
claude-grep
Matches on
session title
full transcript
Scope
current project
all projects
Find by something said mid-chat
Resumes sub-agent sessions
✓ via parent
Live, as-you-type
Branch a conversation from any past message
✓ Ctrl-B
Port OpenCode / Hermes sessions into Claude Code
✓ Ctrl-X
Filter to only what you typed (no AI replies)
✓ Ctrl-U
questions

FAQ

How do I search my Claude Code conversation history?+
Install claude-grep, run the ccfind command, and type any phrase. It runs a live search across every transcript in ~/.claude/projects/ and lets you resume the matching session with Enter.
Can I search past sessions by content, not just the title?+
Yes — that's the whole point. claude --resume only matches the session title or first prompt; claude-grep searches the entire transcript body across all of your projects.
Where does Claude Code store its conversations?+
As JSONL transcripts under ~/.claude/projects/<project>/<session-id>.jsonl. Sub-agent sessions live in a subagents/ subfolder. claude-grep reads these files directly — no export or setup needed.
Does it work with sub-agent sessions?+
Yes. Sub-agent transcripts aren't resumable on their own, so claude-grep automatically resolves them to the resumable parent session and resumes that instead.
Can I move an OpenCode or Hermes session into Claude Code?+
Yes. Press Ctrl-X on any OpenCode or Hermes result and claude-grep converts that conversation into a fresh, resumable Claude Code transcript — tool calls, reasoning, text, and inline images included — then resumes it. The new session records forkedFrom provenance pointing back at the source.
Can I branch a past conversation?+
Yes. Hit Ctrl-B instead of Enter on any row to fork that session from any past message into a new conversation — like git checkout from a commit, but for AI chats. The original thread is left untouched.
What does it depend on?+
fzf (≥ 0.38), ripgrep, Python 3.8+, and the claude CLI on your PATH. On macOS: brew install fzf ripgrep.
Is it free / open source?+
Yes — MIT licensed and a single readable Python script. Read it on GitHub, fork it, rip out the parts you like.