Accessing and Searching Claude Code Conversation History #
Summary #
Claude Code stores all conversation history locally in ~/.claude/ but doesn't provide built-in search capabilities beyond resuming your last 3 sessions. For this project, you have 700+ session files scattered across the project-specific directory at ~/.claude/projects/-Users-wschenk-The-Focus-AI-2025-11-20-ai-engineering-code-summit/.
The recommended approach is a two-tier solution: create a custom /history command for quick access to your conversation list, and install claude-conversation-extractor (a Python CLI tool) for powerful search and export capabilities. For visual exploration, the Claude Code History Viewer desktop app provides heatmaps and analytics.
Project Context #
This project (AI Engineering Code Summit 2025) has extensive Claude Code usage with:
- 700+ individual session files (JSONL format)
- Sessions stored at:
~/.claude/projects/-Users-wschenk-The-Focus-AI-2025-11-20-ai-engineering-code-summit/ - Global command history in:
~/.claude/history.jsonl(312KB) - No existing custom
/historycommand configured
Detailed Findings #
Option 1: Built-in Commands (Limited) #
What it is: Claude Code's native session resumption features.
Why consider it: Zero setup, immediately available.
How to use:
1# Continue your most recent session
2claude -c
3# or
4claude --continue
5
6# Interactive picker for last 3 sessions
7claude --resume
Trade-offs:
- Pro: No setup required, works immediately
- Con: Only shows last 3 sessions - essentially useless for finding older conversations
- Con: No search capability
Option 2: Custom /history Command (Recommended for Quick Access) #
What it is: A markdown file that instructs Claude Code to read and format your conversation history.
Why consider it: Gives you a searchable table of ALL conversations directly in any Claude Code session.
How to implement:
- Create the global commands directory:
1mkdir -p ~/.claude/commands
- Create the history command file:
1cat > ~/.claude/commands/history.md << 'EOF'
2# Conversation History Viewer
3
4Read my global conversation history from `~/.claude/history.jsonl` and display it as a formatted table.
5
6For each conversation entry, show:
71. Entry number
82. Human-readable date/time (e.g., "Nov 23, 2025 20:15")
93. Project folder name (just the last segment of the path)
104. First 60-80 characters of the conversation topic/first message
115. Session ID (for resuming)
12
13Sort by most recent first. Format as a markdown table.
14
15If the user asks to filter, search the message content for their keywords.
16EOF
- Use it in any Claude Code session:
/history
- Resume any found session:
1claude --resume <session-id>
Trade-offs:
- Pro: Works within Claude Code, no external tools
- Pro: Claude can intelligently filter/search based on your request
- Con: Reads entire history file each time (can be slow with large histories)
- Con: Costs tokens to display
Option 3: Claude Conversation Extractor (Best for Search & Export) #
What it is: A Python CLI tool for searching and exporting Claude Code conversations.
Why consider it: Real-time search across all projects, multiple export formats, zero config.
How to install:
1# Using pipx (recommended for CLI tools)
2pipx install claude-conversation-extractor
3
4# Or with pip
5pip install claude-conversation-extractor
How to use:
1# Interactive mode with search
2claude-start
3
4# Direct search
5claude-search "speaker decorator"
6
7# List all conversations
8claude-extract --list
9
10# Export specific conversation
11claude-extract <session-id>
12
13# Export all conversations
14claude-extract --all
15
16# Export with full details (tool calls, MCP, etc.)
17claude-extract --detailed
18
19# Different formats
20claude-extract --format json
21claude-extract --format html
22claude-extract --format markdown # default
For this project specifically:
1# Search for speaker-related conversations
2claude-search "speaker"
3
4# Search for theme-related work
5claude-search "theme"
6
7# Search for specific commands used
8claude-search "conference-analysis"
Trade-offs:
- Pro: Real-time fuzzy search across all conversations
- Pro: Multiple export formats (markdown, JSON, HTML)
- Pro: Works offline, 100% local
- Pro: Can include detailed tool call information
- Con: Requires Python/pipx installation
- Con: Separate terminal session (not integrated into Claude Code)
Option 4: Claude Code History Viewer (Desktop App) #
What it is: A Tauri-based desktop application for browsing conversation history with analytics.
Why consider it: Visual interface, usage analytics, syntax highlighting.
How to install:
Download from: https://github.com/jhlee0409/claude-code-history-viewer/releases
Or build from source:
1git clone https://github.com/jhlee0409/claude-code-history-viewer
2cd claude-code-history-viewer
3./scripts/setup-build-env.sh
4pnpm tauri:build:auto
Key features:
- File tree navigation for projects/sessions
- Activity heatmaps
- Per-project token usage breakdown
- Tool usage statistics
- Syntax-highlighted code blocks
- Formatted diffs
Trade-offs:
- Pro: Beautiful visual interface
- Pro: Analytics and usage insights
- Pro: Helps understand Claude Code habits
- Con: Beta status - expect rough edges
- Con: Requires desktop app installation
- Con: No Windows support yet (macOS/Linux only)
Option 5: Direct File Grep (Quick & Dirty) #
What it is: Using standard Unix tools to search JSONL files directly.
Why consider it: Instant, no installation, works right now.
How to use:
1# Search all sessions in this project for a term
2grep -l "speaker" ~/.claude/projects/-Users-wschenk-The-Focus-AI-2025-11-20-ai-engineering-code-summit/*.jsonl
3
4# Search and see context
5grep -h "speaker" ~/.claude/projects/-Users-wschenk-The-Focus-AI-2025-11-20-ai-engineering-code-summit/*.jsonl | head -20
6
7# Find sessions from a specific date (by file modification time)
8ls -lt ~/.claude/projects/-Users-wschenk-The-Focus-AI-2025-11-20-ai-engineering-code-summit/*.jsonl | head -20
9
10# Search global history for topics
11grep "conference" ~/.claude/history.jsonl
Trade-offs:
- Pro: No installation, works immediately
- Pro: Familiar Unix tools
- Con: Raw JSONL output is hard to read
- Con: No semantic understanding of conversation structure
Recommendation #
For this project, implement a two-tier approach:
-
For day-to-day use: Create the custom
/historycommand (Option 2). This gives you quick access to your conversation list without leaving Claude Code. -
For deep search/export: Install
claude-conversation-extractor(Option 3). When you need to find a specific conversation or export your work, this provides the most powerful search. -
Optional bonus: Install the History Viewer desktop app if you want to visualize your usage patterns and get analytics.
Quick Setup Script #
1# Create /history command
2mkdir -p ~/.claude/commands
3cat > ~/.claude/commands/history.md << 'EOF'
4Read ~/.claude/history.jsonl and show as a table with:
5- Entry # | Date | Project | Topic (first 60 chars) | Session ID
6Sort newest first. Filter by user's keywords if provided.
7EOF
8
9# Install search tool
10pipx install claude-conversation-extractor
11
12echo "Done! Use /history in Claude Code or claude-search in terminal"
When NOT to Use This #
- Just need to continue working: Use
claude -cto continue your last session - Looking for Claude web app history: This is different from Claude Code CLI - the web app has its own search at claude.ai
- Searching for file changes: Use Git history instead (
git log -p) - Finding what Claude edited: Check
~/.claude/file-history/for file-level backups
Sources #
- Claude Code's hidden conversation history (kentgigger.com)
- claude-conversation-extractor (GitHub)
- Claude Code History Viewer (GitHub)
- Claude Code Assist VS Code Extension
- Using Claude's chat search and memory (Anthropic Help)