Unified search and viewer for Claude Code and Codex CLI session history.
Browse, search, and review your AI coding sessions from one place — with syntax-highlighted code blocks, a ledger-style conversation layout, and an interactive TUI picker.
- Unified search across Claude Code and Codex CLI sessions
- Interactive TUI — fzf-style session picker with in-app pager
- Syntax highlighting — code blocks rendered with syntect
- Ledger layout — clean
You │/Claude │column format - Smart tool display — tool calls show key arguments (file paths, commands, patterns)
- Text wrapping — long paragraphs wrap to terminal width
- Dark/light themes — auto-detected from terminal background
- Resume sessions — jump back into a session in its original CLI
cargo install --path .
Or build from source:
cargo build --release
# binary at target/release/agent-history
# Interactive picker (default when run in a terminal)
agent-history
# Search sessions
agent-history "auth flow"
# Filter by source, project, or time
agent-history --source claude --project my-app --since 7d
# Show a specific session (non-interactive; full ID or unique prefix)
agent-history --show <session-id-or-prefix>
# Resume a session in its CLI (full ID or unique prefix)
agent-history --resume <session-id-or-prefix>
# Only sessions from current directory
agent-history --local
| Key | Action |
|---|---|
j/k, Up/Down |
Navigate |
Enter |
Open session |
Space, PgDn |
Page down |
PgUp |
Page up |
g/G |
Top / bottom |
r |
Refresh (re-read session file) |
q, Esc |
Back / quit |
| Type anything | Filter sessions |
agent-history reads the JSONL session files that Claude Code and Codex CLI write to disk:
- Claude Code:
~/.claude/projects/*/sessions/*.jsonl - Codex CLI:
~/.codex/sessions/*.jsonl
Sessions are loaded in parallel, deduplicated, and sorted by timestamp. The viewer parses markdown with pulldown-cmark, highlights code with syntect, and renders everything with raw crossterm calls.
The rendering approach — syntect syntax highlighting, ledger-style columns, terminal theme detection — is inspired by claude-history by @raine.
MIT