claude-history CLI
claude-history searches and opens past Claude Code, Codex and Pi conversations in the terminal and gives Claude a history skill
- 542 ★ on the repository
- Last commit
- MIT
Extended access
Why this level
- Reads all local agent session files, which may hold keys and private code
- Can delete conversations, and delete-empty and in-app deletion erase files without a trash
Install
- Works in
Manual install
brew install raine/claude-history/claude-historyFor macOS and Linux. Alternatives: cargo install claude-history and the install.sh script.
Access and checks
How we reviewExtended accessThe tool runs code or makes network calls and only reads external data.
- Reads all local agent session files, which may hold keys and private code
- Can delete conversations, and delete-empty and in-app deletion erase files without a trash
This is third-party code. Review the repository files before installing.
What it does
claude-history is a Rust terminal program for working with conversation history. Started from a project folder, it finds local Claude Code, Codex, Pi and Oh My Pi sessions and lists them by recency. Typing searches every transcript: fuzzy matching with field-aware scoring, word-boundary awareness and indexing of tool output. Ctrl+T switches to semantic search, which ranks whole conversations by meaning. A chosen conversation opens in a built-in viewer with scrolling, search, message navigation and Markdown rendering. From the list or the viewer you can resume a session (Ctrl+R), fork it (Ctrl+F), export it to a file, copy it to the clipboard, rename it or delete it (Ctrl+X). Forking works across projects, handy with git worktrees. claude-history delete-empty only shows transcripts without messages by default and deletes them with --yes. The repository also ships a skill that lets Claude Code itself find and read past conversations: the agent subcommands return results to the agent, and the skill tells it to treat retrieved text as untrusted data.
Who it is for. People who run many sessions in Claude Code, Codex or Pi and want to find past decisions quickly and resume or fork conversations.
Good fit when
- You need to find the conversation about cache invalidation and open it without grepping JSONL by hand
- A session has to continue in another folder or git worktree through a cross-project fork
- You use Claude Code and Codex together and want to search both in one list
- Claude Code itself should recall what was discussed earlier and quote a passage
Not a fit when
- You need a shared history store for a team: the program reads only local files on your machine
- You use an agent not on the list: Claude Code, Codex, Pi and Oh My Pi are supported
- You want a continuous export of conversations into Obsidian notes: it has file export but no sync
Example request
Find in past sessions how we fixed the flaky reconnect and show the conversation title and dateLimitations
- Prebuilt releases cover macOS on Apple silicon and Intel and Linux x86_64. Other platforms install through Cargo.
- Deleting a conversation erases the session file: for Codex the delete command with --force removes every rollout of the thread, and for Oh My Pi the artifacts folder too.
- Semantic search does not cover auxiliary Codex threads, which are searched lexically only.
- Fragments retrieved through the agent subcommands may contain foreign instructions, so the skill requires treating them as data.
How to disable. With Homebrew run brew uninstall claude-history, with Cargo cargo uninstall claude-history. Remove the skill from the Claude Code skills folder. The settings file is ~/.config/claude-history/config.toml and can be deleted by hand. The program does not touch your conversations until you delete them in its interface.
FAQ
How do I find an old conversation in Claude Code?
Run claude-history from the project folder and start typing: it searches all transcripts. Ctrl+T switches fuzzy search to semantic search, which finds a conversation by meaning, for example a flaky reconnect.
How do I install claude-history?
With Homebrew via brew install raine/claude-history/claude-history, with Cargo via cargo install claude-history, or with the install.sh script from the repository. claude-history update upgrades it.
Does claude-history work with Codex?
Yes, despite the name. It reads Codex threads from $CODEX_HOME or ~/.codex, labels them CX and resumes and forks through the Codex CLI. Pi and Oh My Pi are supported too.
How do I give Claude Code access to conversation history?
Put the skill from skills/claude-history into the skills folder. It calls the claude-history agent subcommands, finds a conversation and summarizes the relevant part. The skill requires treating retrieved text as untrusted data, not instructions.
How do I delete empty transcripts?
Run claude-history delete-empty: it shows what it would delete and changes nothing. Add --yes to delete, or --local to limit it to the current project.
Discussion
No questions or reviews yet.
Related
CLI toolsClaude Code History Viewer
claude-code-history-viewer
A desktop app for browsing, searching and analyzing conversation history from Claude Code, Codex CLI, Gemini CLI, Cursor, Cline, Aider and other agents
An MCP server for searching your Claude Code conversation history: past solutions, errors, plans and file change history.
A SQLite archive of Claude Code sessions with an MCP server, a terminal UI and a web UI for finding past conversations.
A Python CLI that turns Claude Code JSONL transcripts into readable HTML and Markdown with search, filters and a timeline.
Claude Conversation Extractor: export Claude Code chats
Claude Conversation Extractor
A zero-dependency Python CLI that finds Claude Code logs in ~/.claude/projects, searches them and saves chats as Markdown, JSON or HTML
A CLI that gathers Claude Code and Codex session history into a local graph, searches it and turns repeated mistakes into fixes
Comparison with similar tools
Cards that share the main search query, and how they differ.
| Tool | Official | Repository stars | Main difference |
|---|---|---|---|
| claude-history (this card) | no | 542 | |
| Claude Code History Viewer | no | 2,314 | a standalone history viewer, while this is a terminal UI with semantic search and an agent skill |
| Coding Agent Session Search (cass) | no | 1,205 | indexes sessions of many agents, while claude-history adds resume, fork and a skill for Claude |
README in short
The README says the program covers four agents and lists the features. Three install routes, handling of Pi, Oh My Pi and Codex sessions, keybinding tables, time filters and a section on semantic search follow.