Remote-control tmux sessions by sending keystrokes and scraping pane output — essential for managing Claude Code and parallel worker sessions.
npx clawhub@latest install tmuxRequirements
The tmux skill gives your AI agent programmatic control over tmux sessions: reading pane output, sending keystrokes (including special keys like Ctrl+C and Enter), and navigating windows and panes. It is purpose-built for supervising long-running interactive terminal applications — such as Claude Code or Codex sessions — without requiring you to be physically present at the terminal. Sessions persist across SSH disconnects, making this skill ideal for async and parallel workflows.
npx clawhub@latest install tmuxClick the Install button at the top of this page for one-click setup
worker-2 through worker-8) and dispatch tasks to each.exec tool directly instead; no tmux overhead needed.exec with background: true.exec is simpler and more direct.Read the last N lines or the entire scrollback history of any tmux pane using capture-pane. Supports targeting specific sessions, windows, and panes via the session:window.pane format.
Send plain text, Enter, Escape, and control sequences (Ctrl+C, Ctrl+D, Ctrl+Z) to any pane. Text and Enter are dispatched in separate calls to avoid multiline paste edge cases in interactive TUIs.
List, select, rename, create, and kill tmux sessions and windows programmatically. Navigate between panes to focus the right target before sending input.
Detect prompts awaiting user approval (e.g. ❯, Yes/No, proceed) by grepping captured pane output, then respond with a keystroke — enabling fully automated AI coding pipelines.
Loop over a named set of sessions to check status or dispatch tasks simultaneously, supporting workflows with multiple parallel worker sessions.
The agent periodically captures the last 10 lines of each worker pane, greps for permission prompts, and sends y + Enter to approve — keeping coding sessions unblocked without human intervention.
An orchestrator agent sends a different task (e.g. Fix the bug in auth.js) to each of several named tmux sessions, then polls their output to collect results when each finishes.
Capture the full scrollback of a build or test session running in the background, search for error patterns, and surface a summary — all without interrupting the running process.
Drive a terminal UI application (such as a REPL or text-mode editor) by sending structured keystrokes and reading the resulting screen state, enabling scripted interaction with tools that have no API.
npx clawhub@latest install tmuxRequirements
Log in to write a review
No reviews yet. Be the first to share your experience!