DEV Community

decker
decker

Posted on

I Tested 4 Tools for Browsing Claude Code Session History

If you've used Claude Code for more than a week, you've probably had this moment:

"I solved this exact problem last Tuesday. What prompt did I use?"

Claude Code saves every conversation as JSONL files in ~/.claude/projects/. The data is there. But actually finding anything useful in those files? Good luck.

I've been using Claude Code daily since January, and after losing a critical session to an update bug (#29154 on GitHub — you're not alone), I went looking for better ways to manage my session history.

Here's what I found.

The Problem

Claude Code stores sessions across multiple directories:

~/.claude/projects/<project-hash>/sessions/
~/Library/Application Support/Claude/claude-code-sessions/  # Desktop
Enter fullscreen mode Exit fullscreen mode

Each session is a .jsonl file — one JSON object per line, containing every message, tool call, and response. A single afternoon of coding can generate 50MB+ of session data.

The built-in tools give you:

  • claude --resume — lists recent sessions, lets you pick one
  • /history — shows conversation entries from history.jsonl

That works fine for "what did I do 10 minutes ago?" but falls apart when you need to search across weeks of sessions or remember how you debugged a specific issue.

What I Tested

I spent a week using four different approaches to browse my Claude Code history:

1. Built-in CLI (--resume + /history)

What it does: Lists your recent sessions by title and timestamp. You can resume any of them to continue the conversation.

What's good:

  • Zero setup, always available
  • Resume lets you pick up exactly where you left off
  • /history gives a quick chronological view

What's not:

  • No search. You're scrolling through session titles hoping one rings a bell.
  • sessions-index.json corruption means sessions vanish from the list (the JSONL files are fine — the index just lost track of them)
  • Desktop app and CLI can get out of sync

Best for: Resuming a session you just closed. Not for finding something from last week.

2. claude-history (Rust CLI)

What it does: A terminal TUI that gives you fuzzy search across your Claude Code conversations. Written in Rust, so it's fast.

What's good:

  • Really fast fuzzy search across all sessions (it's Rust, so yeah)
  • Terminal-native, fits right into the Claude Code workflow
  • Shows conversation content inline

What's not:

  • Claude Code only — no Cursor, no Codex
  • Read-only search — you can find a session, but you're reading raw JSONL
  • No code diff view — you see what Claude said, but not what changed in your files

Best for: Power users who live in the terminal and just want to search conversation text.

3. Claude Code History Viewer (CCHV)

What it does: A desktop app (Electron-based) that visualizes sessions from Claude Code, Codex, and OpenCode. Shows token usage analytics.

What's good:

  • Cross-tool support (Claude Code + Codex + OpenCode)
  • Token usage breakdown — see which sessions burned the most tokens
  • Clean UI with session browsing

What's not:

  • No time-travel replay — you see the conversation, not the coding process
  • No search across session content (browsing only)
  • No security features for sensitive content

Best for: Getting a bird's-eye view of your token spend and browsing conversations visually.

4. Mantra

What it does: Records and replays AI coding sessions — terminal I/O, code changes, the full timeline. Works with Claude Code, Cursor, Codex, and Gemini CLI.

What's good:

  • Scrub through the timeline like a video to see what happened
  • Shows what code changed at each step, not just the conversation
  • Works across 4 major AI coding tools, not just Claude Code
  • Detects and redacts API keys, credentials before you share sessions
  • MCP and Skills management across tools

What's not:

  • Heavier setup than a CLI tool
  • Desktop app (not terminal-native)
  • Newer project — smaller community

Best for: When you need to understand how a session played out, not just read what was said. Also handy if someone else on the team needs to review your AI coding sessions.

The Verdict

No single tool wins across the board. Depends on what you're after:

Need Best Pick
Quick resume of recent session Built-in --resume
Fast text search across history claude-history
Token usage analytics CCHV
Full replay + code changes Mantra
Multi-tool support Mantra or CCHV
Sensitive content handling Mantra

My current setup: I use --resume for quick continuations, and Mantra when I need to understand how a past coding session actually played out — especially for replaying sessions where I solved tricky bugs.

One More Thing

If you've lost sessions after a Claude Code update, check the raw JSONL files before panicking. The data is usually still there — it's the index that breaks. Here's the quick recovery:

# Check if your session files exist
ls ~/.claude/projects/*/sessions/*.jsonl

# Count your sessions
find ~/.claude -name "*.jsonl" -path "*/sessions/*" | wc -l

# For Desktop app, also check:
ls ~/Library/Application\ Support/Claude/claude-code-sessions/
Enter fullscreen mode Exit fullscreen mode

If the files are there but --resume doesn't show them, the sessions-index.json needs rebuilding. Each tool above handles this differently (or not at all), so pick the one that matches your workflow.

What's your approach to managing AI coding session history? I'm curious if anyone has other tools or workflows worth trying.

Top comments (0)