← 목록

Every Claude Code session across all your projects, in one list — hit Enter to resume

devto 2026-07-07 원문 보기 ↗


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:

The solution

Solution

Claude Code already stores everything you need as plain JSONL:

~/.claude/projects/<encoded-project-path>/<session-id>.jsonl

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.

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

Script, docs, and caveats (the storage format is undocumented — this only ever reads it):

GitHub logo DenverLifeSciences / claude-sessions

Cross-project session picker for Claude Code CLI — fzf over all your sessions, Enter resumes each in a new tab

claude-sessions

A cross-project session picker for Claude Code CLI.

Your machine crashes with seven Claude Code sessions open across five repos. claude --resume only lists sessions for the directory you run it from — so recovery means remembering every repo you were in, cd-ing into each one, and picking from a list, seven times.

claude-sessions instead lists every session from every project in one fzf picker, newest first. Hit Enter and the session opens in a new iTerm tab (or tmux window) running claude --resume <id> in the right directory — while the picker stays open for the next one.

enter   open session in a new tab (picker stays open)
ctrl-a  hide/show agent-teammate sessions (⛭)
ctrl-r  refresh the list
esc     quit

Each line shows the session's age, project directory, git branch (when not main/master), and its opening message. A preview pane shows the last few user/assistant exchanges of the…