DEV Community

lef237
lef237

Posted on

clauhist: browse full Claude Code history and resume sessions across projects

Claude Code can already help you resume work from a project if you move into that working directory and use /resume there.

The limitation is that this is tied to the current working directory. If you want to look back across all of your past work, including sessions from other repositories and directories, that gets awkward.

clauhist is a small CLI tool for that case. It shows your Claude Code history in fzf, lets you browse sessions across working directories, and resume one from the list.

What it shows

Sessions are sorted by recent activity. Each row includes:

  • the last activity time
  • the project path
  • whether the path still exists
  • a preview of the first message
  • the message count

There is also a preview pane with the session ID, timestamps, and message list. Once you find the one you want, press Enter.

How it works

clauhist reads ~/.claude/history.jsonl, groups entries by session, and passes the result to fzf.

After you select a session, it runs:

claude --resume <session-id>
Enter fullscreen mode Exit fullscreen mode

It does not keep its own database or add another history layer. It is just a thin local browser over Claude Code's existing history file.

Installation

cargo install clauhist
Enter fullscreen mode Exit fullscreen mode

Or install from source:

git clone https://github.com/lef237/clauhist.git
cd clauhist
cargo install --path .
Enter fullscreen mode Exit fullscreen mode

You also need fzf and Claude Code installed.

Usage

clauhist
Enter fullscreen mode Exit fullscreen mode

Main controls:

  • Enter: resume the selected session
  • type: filter the list
  • Ctrl-/: toggle preview
  • Ctrl-C: exit

means the project directory still exists. means it was moved or deleted. You can still resume the session, but cd into the original directory may fail.

Shell integration

If you add this to your shell config:

eval "$(clauhist init zsh)"
Enter fullscreen mode Exit fullscreen mode

then clauhist changes your current shell into the selected project directory before starting Claude Code.

Without this, clauhist uses a subshell for the directory change, so when Claude exits you return to your original directory. bash and fish are supported too.

Local-only

clauhist only reads ~/.claude/history.jsonl and launches claude --resume. It does not send your history anywhere.

That is the whole tool: a simple way to browse past Claude Code sessions across projects and reopen one without moving directory by directory.

GitHub

You can find the repository here :)

clauhist

Browse your Claude Code history and resume sessions with ease.

╭───────────────────────────────────────────────────────────────────────────────────────╮
│ Claude Code History Browser  [Enter: resume  Ctrl-/: toggle preview  Ctrl-C: cancel]  │
├───────────────────────────────────────────────────────────────────────────────────────┤
│ Search:                                                                               │
│ > 2026-03-18 09:12  ✓ ~/projects/myapp      Tell me about Rust error handling…  (12) │
│   2026-03-17 22:45  ✓ ~/sandbox/api-client  Generate client from OpenAPI schema  (8) │
│   2026-03-17 14:30  ✗ ~/old-project         Database migration steps             (3) │
╰───────────────────────────────────────────────────────────────────────────────────────╯

(Example output — actual appearance depends on your terminal and fzf version)

Select a session and press Enter — clauhist opens claude --resume in the project directory. When you exit Claude, you return to your original shell.


Requirements






















Dependency Required
Rust Build only
fzf Runtime
Claude Code Runtime

Note: fzf provides the interactive UI — clauhist will not work without it.


Installation

cargo install clauhist
Enter fullscreen mode Exit fullscreen mode

Or build from source:

git clone https://github.com/lef237/clauhist.git
cd clauhist
cargo install --path .
Enter fullscreen mode Exit fullscreen mode

Make sure ~/.cargo/bin is in your…

https://github.com/lef237/clauhist

Top comments (0)