{"slug": "i-had-1063-claude-code-conversations-and-couldn-t-find-anything-so-i-built-grep", "title": "I had 1,063 Claude Code conversations and couldn't find anything — so I built claude-grep", "summary": "A developer built claude-grep, a full-text search tool for Claude Code conversation history, after accumulating 1,063 transcripts totaling 256 MB that were impossible to search through. The tool uses fzf and ripgrep to provide live streaming search results across all JSONL transcript files, and automatically resolves sub-agent sessions to their parent conversations for seamless resumption. The open-source Python script is available on GitHub under an MIT license.", "body_md": "I use Claude Code a *lot*. Enough that when I finally counted, I had **1,063 conversations** sitting in `~/.claude/projects/`\n\n— around 256 MB of JSONL transcripts.\n\nAnd I could never find the one I needed.\n\nYou know the feeling: *\"I definitely solved this exact bug a few weeks ago… in some conversation… somewhere.\"* But Claude Code's built-in `--resume`\n\npicker only matches on a session's **title** (its first prompt). It has no idea what was actually *said* inside. So the conversation where I'd figured out the gnarly thing was, in practice, gone.\n\nSo I built ** claude-grep**: live full-text search across your entire Claude Code history, with one keypress to jump back into any conversation.\n\nYou type, and results stream in as you go. Each row shows the matched snippet with your phrase highlighted, the conversation's working directory, and when it happened. Hit `Enter`\n\nand it `cd`\n\ns into that project and runs `claude --resume`\n\non the right session — you're back exactly where you left off.\n\nUnder the hood it's deliberately boring and fast:\n\n`--disabled`\n\n+ `change:reload`\n\ntrick — fzf re-runs the search on every keystroke instead of fuzzy-filtering what's already on screen.No index to build, nothing running in the background. It just reads the files Claude Code already writes.\n\nWhen I first wired up \"press Enter to resume,\" a bunch of conversations simply wouldn't open.\n\nIt turns out **940 of my 1,063 transcript files were sub-agent sessions** — the side conversations Claude Code spawns to handle sub-tasks. They live here:\n\n```\n~/.claude/projects/<project>/<PARENT-UUID>/subagents/agent-*.jsonl\n```\n\n…and they are **not resumable** on their own. `claude --resume agent-abc123`\n\ndoes nothing.\n\nBut the path gives it away: the parent session's UUID is *literally the directory name above* `subagents/`\n\n. (It's also stored in the file's `sessionId`\n\nfield, alongside `isSidechain: true`\n\n.) So when a match lands inside a sub-agent transcript, claude-grep resolves it to the parent and resumes **that** — using the parent's working directory, so it even survives sub-agents that ran in a since-deleted git worktree.\n\n``` python\ndef resumable_session(path):\n    parent_dir = os.path.dirname(path)\n    if os.path.basename(parent_dir) == \"subagents\":\n        # sub-agent transcript → resume the parent session instead\n        return os.path.basename(os.path.dirname(parent_dir)), True\n    base = os.path.basename(path)\n    return (base[:-6] if base.endswith(\".jsonl\") else base), False\n```\n\nResults then get de-duplicated by resumable session, so you never see two rows that open the same conversation.\n\nYou'll need `fzf`\n\n, `ripgrep`\n\n, Python 3, and the `claude`\n\nCLI on your `PATH`\n\n.\n\n```\ngit clone https://github.com/coolcorexix/claude-grep.git\nln -sf \"$PWD/claude-grep/ccfind\" ~/.local/bin/ccfind   # ~/.local/bin must be on PATH\nccfind\n```\n\nIt's MIT-licensed and a single Python script — read it, fork it, rip out the parts you like.\n\n👉 [github.com/coolcorexix/claude-grep](https://github.com/coolcorexix/claude-grep)\n\nIf you live in Claude Code as much as I do, I'd love to hear what you search for first — and if you hit a transcript shape it chokes on, open an issue. There are a *lot* of edge cases hiding in those JSONL files.", "url": "https://wpnews.pro/news/i-had-1063-claude-code-conversations-and-couldn-t-find-anything-so-i-built-grep", "canonical_source": "https://dev.to/coolcorexix/i-had-1063-claude-code-conversations-and-couldnt-find-anything-so-i-built-claude-grep-45k2", "published_at": "2026-06-04 14:24:13+00:00", "updated_at": "2026-06-04 14:42:54.174508+00:00", "lang": "en", "topics": ["ai-tools", "ai-agents", "large-language-models", "ai-products", "artificial-intelligence"], "entities": ["Claude Code", "claude-grep", "Anthropic"], "alternates": {"html": "https://wpnews.pro/news/i-had-1063-claude-code-conversations-and-couldn-t-find-anything-so-i-built-grep", "markdown": "https://wpnews.pro/news/i-had-1063-claude-code-conversations-and-couldn-t-find-anything-so-i-built-grep.md", "text": "https://wpnews.pro/news/i-had-1063-claude-code-conversations-and-couldn-t-find-anything-so-i-built-grep.txt", "jsonld": "https://wpnews.pro/news/i-had-1063-claude-code-conversations-and-couldn-t-find-anything-so-i-built-grep.jsonld"}}