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

작성자

카테고리:

← 피드로
DEV Community · Daksh Gargas · 2026-07-07 개발(SW)
Cover image for Every Claude Code session across all your projects, in one list — hit Enter to resume

Daksh Gargas

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 cd into each one.
  • It takes over the shell you run it from — so you’re spawning windows and retyping paths anyway.

The solution

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 --resume only lists sessions for the directory you run it from. claude-sessions lists every session from every project in one picker, newest first. Enter opens the highlighted session in a new iTerm tab (or tmux window) running claude --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…

원문에서 계속 ↗

코멘트

답글 남기기

이메일 주소는 공개되지 않습니다. 필수 필드는 *로 표시됩니다