The problem
My Mac hard-crashed with seven Claude Code CLI sessions open, across five repos. All gone.
The built-in recovery is claude --resume, and it doesn’t scale to seven:
- It only lists sessions for the directory you run it from — you have to remember which repos you were even in, then
cdinto each one. - It takes over the shell you run it from — so you’re spawning windows and retyping paths anyway.
The solution
Claude Code already stores everything you need as plain JSONL:
~/.claude/projects/<encoded-project-path>/<session-id>.jsonl
Enter fullscreen mode Exit fullscreen mode
The first lines of each file carry the session id, working directory, git branch, and your opening message. That’s a complete cross-project session index sitting on disk — it just needs fzf pointed at it.
So: claude-sessions, one script.
- Every session from every project in one list, newest first, with a live preview of the conversation.
-
Enter opens the highlighted session in a new iTerm tab (or tmux window):
cd <project> && claude --resume <id>— in the right directory, with Claude’s own “summary or full session?” prompt appearing in the new tab. The picker stays open for the next one. - Sessions spawned by agent teams are tagged
⛭ agent-name; ctrl-a hides them.
Restoring my seven sessions: Enter, seven times. ~10 seconds.
Install
Needs fzf and python3. Tab-opening is macOS (iTerm2/Terminal); inside tmux it works on Linux too.
curl -fsSL https://raw.githubusercontent.com/DenverLifeSciences/claude-sessions/main/claude-sessions -o /usr/local/bin/claude-sessions
chmod +x /usr/local/bin/claude-sessions
Enter fullscreen mode Exit fullscreen mode
Script, docs, and caveats (the storage format is undocumented — this only ever reads it):
claude-sessions
Find and resume any Claude Code session from any project — and rebuild your whole terminal after a reboot — from one fzf picker.
What it does
-
Cross-project picker.
claude --resumeonly lists sessions for the directory you run it from.claude-sessionslists every session from every project in one picker, newest first. Enter opens the highlighted session in a new iTerm tab (or tmux window) runningclaude --resume <id>in the right directory — and the picker stays open for the next one. - Crash recovery. A timer snapshots your full iTerm layout every 5 minutes — every window/tab, its working directory, and the Claude session running inside it After a reboot (or an unattended OS update), one command rebuilds the whole set.
Why. Recovering by hand means remembering every repo you had open, cd-ing into
each, and running claude --resume there — once per session. This collapses…

답글 남기기