tmux plugin

Every session, window, and pane. One tree.

A persistent sidebar on the left of every tmux window. It shows your whole server as a tree and tells you which AI agents are working, waiting on you, or done.

claudecodexcursoropencodepikiro
tmux · work
The sidebar tree lists sessions, windows, and panes. A badge on the claude pane changes from running to needs input to done as the agent works.

├─ What it does

tmux-pane-tree in a live session: tree navigation, agent badges, and pane icons
Recorded in a live session. Click to enlarge.

├─ Install

Requires tmux 3.0+, Python 3, and bash 4.0+.

# ~/.tmux.conf
set -g @plugin 'sandudorogan/tmux-pane-tree'
set -g @tmux_pane_tree_install_agent_hooks 1   # optional: wire agent hooks on load

Reload tmux, then prefix I.

├─ Keys

From any pane

prefix tToggle the sidebar
prefix TFocus the sidebar, or return to the main pane

Move

j kMove selection, arrows work too
gg GTop, bottom
Ctrl+o Ctrl+iJump list back, forward
EnterJump to the selected pane
Ctrl+lReturn focus to the main pane
qClose the sidebar

Manage

aw asAdd window, add session
rw rsRename window, rename session
xClose the selected pane
mOpen the context menu
fToggle the pane filter
pToggle hide-panes mode

Closing the last pane removes its window. Closing the last window removes its session. The jump list starts from the pane you came from and resets when the sidebar loses focus.

├─ Config

Set options with set -g in your tmux config. Unset colors derive from your tmux theme.

OptionDefaultDoes
@tmux_pane_tree_width25Sidebar column width
@tmux_pane_tree_focus_on_open1Focus the sidebar when toggled open
@tmux_pane_tree_toggle_keytPrefix key to toggle
@tmux_pane_tree_focus_keyTPrefix key to focus
@tmux_pane_tree_session_order—Comma-separated session order, rest follow
@tmux_pane_tree_filter—Comma-separated pane filter, matched against command, title, and agent
@tmux_pane_tree_hide_panesoffShow only sessions and windows
@tmux_pane_tree_scrolloff8Rows kept visible around the cursor, 0 off
@tmux_pane_tree_icon_themeautoauto, ascii, unicode, or nerdfont
@tmux_pane_tree_icon_<app>—Override one app icon
@tmux_pane_tree_badge_<status>—Override one status badge
@tmux_pane_tree_color_session—Session name color, hex
@tmux_pane_tree_color_window—Window name color, hex
@tmux_pane_tree_color_pane—Pane name color, hex
@tmux_pane_tree_install_agent_hooks0Install agent hooks when the plugin loads
@tmux_pane_tree_<action>_shortcut—Override a sidebar shortcut

Shortcuts

Actions: add_window, add_session, go_top, go_bottom, jump_back, jump_forward, rename_window, rename_session, toggle_filter, close_pane. If any shortcut is empty, duplicated, a prefix of another, or uses q, all ten revert to defaults.

set -g @tmux_pane_tree_close_pane_shortcut dd
set -g @tmux_pane_tree_filter "claude,codex,cursor,opencode"

Icons

auto picks nerdfont when a Nerd Font is installed on the tmux host, else ascii. If glyphs render wrong, or the session is remote, set the theme explicitly. Badges follow the theme.

set -g @tmux_pane_tree_icon_theme ascii
set -g @tmux_pane_tree_icon_claude "A"
set -g @tmux_pane_tree_badge_running "*"

Environment

TMUX_PANE_TREE_STATE_DIRState directory, default $XDG_STATE_HOME/tmux-sidebar
TMUX_PANE_TREE_PLUGIN_DIRPlugin root used by the example hooks
TMUX_PANE_TREE_FONT_DIRSPath-separated font directories checked by icon theme auto

└─ Agent hooks

agent hook ──▶ scripts/features/hooks/hook-<agent>.sh
                      │
                      ▼
           update-pane-state.sh --pane $TMUX_PANE --app claude --status running
                      │
                      ▼
           $STATE_DIR/pane-%N.json ──▶ sidebar badge

The installer writes the wiring for every agent and keeps three timestamped backups per file. Run it on load with @tmux_pane_tree_install_agent_hooks 1, or by hand:

bash ~/.config/tmux/plugins/tmux-pane-tree/scripts/features/hooks/install-agent-hooks.sh
Claude~/.claude/settings.json
Codex~/.codex/config.toml, the notify line
Cursor~/.cursor/hooks.json
OpenCode~/.config/opencode/plugins/tmux-pane-tree.js
Pi~/.pi/agent/extensions/tmux-pane-tree.ts
Kiro~/.kiro/agents/tmux-pane-tree.json, ~/.kiro/settings/cli.json

Subagent completions are suppressed so only the parent session shows ✅. To wire hooks by hand, copy from examples/ and point each tool at its wrapper under scripts/features/hooks/.