List panes in window: tmux list-panes -t "session:window" -F "#{pane_index}: #{pane_current_command} - #{pane_current_path}" </discovery>
<targeting> Format: session:window.pane (pane is 0-indexed). Window can be name or index. If single pane, .0 optional. Session name must match exactly. </targeting> <commands> Send command: tmux send-keys -t "session:window.pane" "command" Enter Stop process: tmux send-keys -t "session:window.pane" C-c (no Enter after C-c) Capture output: tmux capture-pane -t "session:window.pane" -p With scrollback: tmux capture-pane -t target -p -S -50 | tail -30 </commands><dev_server_restart>
- •Find pane: tmux list-windows -a
- •Identify process: tmux list-panes -t "session:window" -F "#{pane_index}: #{pane_current_command}"
- •Stop: tmux send-keys -t target C-c
- •Verify stopped via capture
- •Start: tmux send-keys -t target "yarn start" Enter
- •Verify started via capture after delay </dev_server_restart>
<error_recovery> Command not executing: verify target exists with list-windows/list-panes. Process not stopping: try multiple C-c sends. Output garbled: use -J flag for join lines. </error_recovery>
<practices> Always verify target pane before sending. Capture output before and after operations. Use delay between stop and start. Check pane current_command to confirm state. Never assume pane state. </practices>