tmux-claude-sessions

February 21, 2026 · View on GitHub

Browse and resume all your Claude AI conversations directly from tmux

TPM compatible tmux ≥ 3.2 Python 3 MIT License

demo

One keypress (Prefix + g) opens a floating popup listing every Claude conversation, grouped by project, with a live preview on the right. Select one to instantly resume it in a new tmux window.


Install

TPM

set -g @plugin 'aomerk/tmux-claude-sessions'

Press Prefix + I to install.

Manual (one line)

git clone https://github.com/aomerk/tmux-claude-sessions ~/.tmux/plugins/tmux-claude-sessions

Add to ~/.tmux.conf:

run-shell ~/.tmux/plugins/tmux-claude-sessions/tmux-claude-sessions.tmux

Reload: tmux source ~/.tmux.conf


Requirements

DependencyVersionNotes
tmux≥ 3.2For display-popup support
fzfanyFuzzy finder
Python3.xShips with most systems
Claude CLIanyclaude must be in $PATH

Features

  • Instant access — open from anywhere in tmux with one keypress
  • Grouped by project — conversations organized under their source directory
  • Live preview — full conversation rendered on the right as you browse
  • Smart dedup — switching to an already-open session jumps to its window
  • Fuzzy search — type to filter across all sessions and projects
  • Keyboard-driven — vim-style navigation inside the preview pane
  • Configurable — key binding, popup size, and projects directory are all overridable

Configuration

Add to ~/.tmux.conf before the run-shell / TPM line:

OptionDefaultDescription
@claude_sessions_keygTrigger key (Prefix + this key)
@claude_sessions_popup_width80%Popup width
@claude_sessions_popup_height75%Popup height
@claude_sessions_dir~/.claude/projectsClaude projects directory
set -g @claude_sessions_key 'C'
set -g @claude_sessions_popup_width '90%'
set -g @claude_sessions_popup_height '85%'

Keybindings

Inside the popup:

KeyAction
EnterOpen selected session
Esc / Ctrl-cClose popup
/ or Ctrl-k / Ctrl-jMove selection
J / KScroll preview down / up
g / GPreview top / bottom
Ctrl-d / Ctrl-uPreview half-page down / up
/Toggle preview pane
Type anythingFuzzy-filter sessions

How it works

Claude CLI stores conversations in ~/.claude/projects/ with an encoded directory naming scheme: each project path is flattened by replacing / with - and . with --.

So /home/alice/projects/webapp becomes -home-alice-projects-webapp.

picker.py reverses this with a greedy filesystem walk, recovering the real path for each project. Sessions are .jsonl files named by UUID. preview.py renders the conversation with role badges. open.sh runs claude -r <session-id> in a new tmux window, or switches to the existing window if that session is already open.


License

MIT © 2026 aomerk