tmux-claude-hatch

A tmux plugin (plus an optional Claude Code plugin) that runs a Claude Code
session in a popup for each project directory. Open the hatch, hand Claude the
work, close it and get back to your editor. Each session lives in its own nested
tmux session, so closing the hatch never interrupts it. When you want to check
in, an fzf picker lists every running session, shows what each one is doing,
and jumps you straight to it. And when a session finishes or needs your
attention, it rings a bell that highlights the window you launched it from — so
you know where to go without even opening the picker.
Simple by design: it's just a few shell scripts.
Why / philosophy
- Who it's for
- People who want to stay in their editor — (Neo)vim, Emacs — in the main tmux
session
- People who still read, write, and review the code themselves
- People who'd rather have a small tool than a full-blown one just to manage
agent sessions
- Who it's not for
- People whose focus is the agent's chat interface rather than the code
- People who want one tool for sessions across several AI providers — this one
is Claude Code only
- People who run a swarm of agents and don't read or write code themselves
Features
- A central picker (
prefix + u) listing every running Claude agent —
several in one project, and any running loose in an ordinary pane.
- Live status per agent —
working / waiting / idle — read straight
from the session files Claude Code keeps, so you instantly see which need you.
No setup.
- A live preview of each agent's screen right in the picker.
- Smart jump — selecting an agent switches your client to the window it
was launched from, then resumes it in a popup over it.
- A launcher (
prefix + y) that opens/attaches a Claude session for the
current directory.
- Quick kill (
ctrl-x) of a finished agent from the picker.
- Copy location (
ctrl-y) — puts an agent's session:window.pane target
on the clipboard, ready for tmux send-keys -t and friends.
- Bell forwarding — a bell in a dedicated session highlights the window
you launched it from, so you notice even without opening the picker
(one-time Claude Code setup).

Prerequisites
- tmux ≥ 3.2 (for
display-popup)
- fzf — the picker UI
- jq — parses Claude Code's session files
- Claude Code ≥ 2.1.139 — for the
claude agents command, the fallback when the session files can't be read
(claude --version to check)
- bash; macOS or Linux
Installation
tpm
Add to ~/.tmux.conf (or ~/.config/tmux/tmux.conf):
set -g @plugin 'craftzdog/tmux-claude-hatch'
Then hit prefix + I to install.
Keybinding note: by default the plugin binds prefix + y (launch) and
prefix + u (list). If your config binds those elsewhere, either change the
options, or make sure the plugin loads after your own bindings
(put run '~/.tmux/plugins/tpm/tpm' after them) so the one you want wins.
(Optional) Claude Code plugin
Independent of the tmux plugin above. It ships the Claude Code hook
configuration this plugin wants, so you don't have to hand-edit
~/.claude/settings.json:
- Rings the terminal bell when an agent ends a turn, asks for permission, or
asks you a question — the moments the picker calls
idle and waiting. That
is what bell forwarding needs in order to
highlight the window you launched the agent from.
- Refreshes the picker's agent cache on those same events, plus session
start/end and prompt submit. The picker paints its first frame from that cache
(unless
@claude_picker_cache is 'off'), so without this it can be stale —
showing working for an agent that has been waiting on you.
/plugin marketplace add craftzdog/tmux-claude-hatch
/plugin install tmux-claude-hatch@tmux-claude-hatch
See plugins/tmux-claude-hatch for exactly what
it registers.
Usage
| Key | Action |
|---|
prefix + y | Launch (or re-attach to) a Claude session for the current directory, in a popup |
prefix + d | Close the popup and go back to your window; the Claude session keeps running |
prefix + u | Open the agent picker |
Inside the picker: