tmux
Remotely control tmux sessions for interactive CLIs by sending keystrokes, monitoring output, and managing pane/window navigation.
Introduction
The tmux skill provides a robust interface for agents to interact with long-running terminal applications within the OpenClaw environment. It is designed to act as an bridge between the assistant and interactive command-line interfaces (CLIs) like Claude Code, shell scripts, or background development tasks. By abstracting the complexities of tmux sessions, windows, and panes, this skill allows for granular control over headless or persistent terminal environments, ensuring that automated workflows remain reliable across disconnections.
-
Precise input delivery: Send specific keystrokes, standard text, or control sequences (such as Ctrl+C, Ctrl+D, or Enter) to any targeted tmux pane.
-
Output observability: Capture pane scrollback buffers in real-time to analyze process status, watch for error logs, or parse interactive prompts.
-
Session lifecycle management: Programmatically create, rename, list, and terminate tmux sessions to maintain organized workspace environments.
-
Navigation control: Dynamically switch between tmux windows and specific panes using indexed targeting (session:window.pane).
-
Interactive automation: Monitor for specific patterns or state changes within terminal output to trigger automated responses, such as approving prompts or proceeding with long-running build tasks.
-
This tool is best suited for scenarios where the agent must maintain stateful persistence in a terminal, such as debugging, continuous integration, or running interactive assistants.
-
Use the capture-pane -p command to extract data directly for further processing or agent decision-making. Target the session:window.pane format consistently to avoid input delivery errors. When handling interactive TUIs, separate text entry and Enter keys with brief delays to prevent input buffering or multiline edge cases. Remember that this skill is not for one-off shell execution; for simple non-interactive commands, consider using the system exec tool instead. Always ensure that the targeted tmux session exists before sending commands to prevent execution failures.
Repository Stats
- Stars
- 365,899
- Forks
- 75,022
- Open Issues
- 6,951
- Language
- TypeScript
- Default Branch
- main
- Sync Status
- Idle
- Last Synced
- Apr 29, 2026, 01:33 AM