| name | tmux-ops |
| description | Use when the user asks to manage tmux sessions/windows/panes, send keys, capture logs, or inspect pane state. |
tmux Ops
Guide agents to reliably inspect tmux state, target the correct pane, and send keys.
Quick start
tmux list-panes -a -F '#{session_name}:#{window_index}.#{pane_index} #{pane_id} #{pane_current_command} #{pane_title}'
tmux send-keys -t %3 "echo hello" C-m
tmux capture-pane -t %3 -p -S -200
Workflow
- Identify target pane
tmux list-sessions
tmux list-windows -a -F '#{session_name}:#{window_index} #{window_name}'
tmux list-panes -a -F '#{session_name}:#{window_index}.#{pane_index} #{pane_id} #{pane_current_command} #{pane_title}'
- Confirm focus (optional)
tmux display-message -p -t %3 '#{session_name}:#{window_index}.#{pane_index} #{pane_id} #{pane_current_command}'
- Send keys
tmux send-keys -t %3 "<command>" C-m
Common operations
tmux new-session -d -s work
tmux split-window -t work:0 -h
tmux split-window -t work:0 -v
tmux select-pane -t %3
- Stop the process in a pane (graceful)
tmux send-keys -t %3 C-c
tmux kill-pane -t %3
tmux capture-pane -t %3 -p -S -200
Safety rules
- Always list panes and confirm the target pane ID before sending destructive keys.
- Prefer
C-c to stop a process before kill-pane.
- Avoid
kill-session unless the user explicitly asks.
Output guidance
- Return concise summaries: target pane ID, action taken, and any captured output snippets.
- If the target pane is ambiguous, ask the user to choose from the pane list.