craftzdog/tmux-claude-hatch
tmux plugin that runs Claude Code sessions in popups per project directory, with an fzf picker showing each session's status and a bell that highlights the window that needs you.
tmux‑claude‑hatch – a tmux helper for Claude Code
What it is
- A tiny tmux plugin (plus an optional Claude Code side‑plugin) that lets you start a Claude Code agent in a tmux popup tied to the current project directory.
- Each agent runs in its own nested tmux session, so closing the popup doesn’t kill the work.
- A central fzf‑based picker shows every running Claude session, its live status (working / waiting / idle), a preview of its screen, and lets you jump to, kill, or copy the session’s target.
Why you might want it
- You spend most of your time inside a terminal editor (vim, neovim, Emacs) and don’t want to switch to a separate chat UI.
- You still want to read, write, and review the code the agent produces.
- You prefer a lightweight, script‑based tool over a heavyweight IDE‑style AI assistant.
Key features (from the README)
| Feature | What it does |
|---|---|
Launcher (prefix + y) |
Opens (or re‑attaches to) a Claude session for the current directory in a tmux popup. |
Picker (prefix + u) |
Lists all running Claude agents with live status, a screen preview, and quick actions. |
| Live status | Reads Claude Code’s session files (via jq) to show working, waiting, or idle without extra configuration. |
| Bell forwarding | When Claude rings the terminal bell (on turn end, permission request, etc.) the plugin highlights the originating window so you notice even if the picker is closed. |
| Smart jump | Selecting an entry jumps back to the window where the agent was launched and resumes it in a popup. |
| Quick kill / copy | Ctrl‑x kills the highlighted agent; Ctrl‑y copies its session:window.pane identifier to the clipboard for manual tmux send-keys. |
| Customizable fzf | You can pass extra fzf options or rebind keys via the @claude_fzf_options tmux variable. |
How it works
- Prerequisites – tmux ≥ 3.2 (for
display-popup),fzf,jq, Claude Code ≥ 2.1.139, and a Bash‑compatible shell. - The plugin creates a nested tmux session named
claude‑<hash>(prefix configurable). The Claude command runs inside that session. - A small shell script (
$CLAUDE_PICKER) reads Claude’s session JSON files to build the list shown byfzf. - Optional Claude Code plugin adds a hook that makes Claude emit a terminal bell at key moments, enabling the “bell forwarding” visual cue.
Installation
- Via TPM – add
set -g @plugin 'craftzdog/tmux-claude-hatch'to~/.tmux.confand pressprefix + I. - Manual – clone the repo and
run-shell ~/path/claude_hatch.tmuxfrom your tmux config. - Optional Claude Code side‑plugin – install through Claude’s plugin marketplace (
/plugin marketplace add craftzdog/tmux-claude-hatch).
Configuration (set before the plugin loads)
set -g @claude_launch_key 'y' # launch popup
set -g @claude_list_key 'u' # open picker
set -g @claude_command 'claude' # executable
set -g @claude_args '' # extra args
set -g @claude_session_prefix 'claude-'
set -g @claude_popup_width '90%'
set -g @claude_popup_height '90%'
set -g @claude_fzf_options ''
set -g @claude_picker_cache 'on'
set -g @claude_sort 'status' # or 'recent'
set -g @claude_forward_bell 'on'
Typical workflow
- In a tmux pane editing code, press
prefix + y→ a popup appears with Claude ready to work on that directory. - When Claude needs your input, it rings the bell; the originating window is highlighted.
- Press
prefix + uto open the picker, see which agents are waiting, and jump back withEnteror kill them withCtrl‑x.
License – MIT (© Takuya Matsuyama).
All details above are taken directly from the repository’s README; no additional features are inferred.
Related
- Project
- Project
- Project
- Project
- Project