MyClaw
HomeProductsUse CasesPricingSkillsResourcesCompany
HomeUse CasesPricingSkills
Sign In
Home
ProductsOpenClaw HostingHermes Agent Hosting
Use CasesPricingSkills
ResourcesCompareTutorialLearnBlogUpdatesResourcesCommunity
CompanyAboutSupport
Sign In
MyClaw.ai

Your AI agent, already running.

Product

OpenClaw HostingHermes Agent HostingUse CasesPricingCompareAlibaba Cloud

Resources

BlogUpdatesSkillsModelsSupportCommunityCapybara

Legal

TermsPrivacyCookieGDPRContact

© 2023 Cubo World Inc. All rights reserved.

← Back to Skills
Coding Agents & IDEs
🧵

tmux

Remote-control tmux sessions by sending keystrokes and scraping pane output — essential for managing Claude Code and parallel worker sessions.

by OpenClawv1.0.0
ProductivityAutomationCLISelf-HostedDeveloper Tool
Connecting to VM...
Connecting to VM...
npx clawhub@latest install tmux
16Current Installs
📦
v1.0.0Version

Requirements

tmux

tmux Skill Overview

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.

How to Use It

Step 1: Run in your terminal or install this skill on MyClaw

npx clawhub@latest install tmux
or

Click the Install button at the top of this page for one-click setup

When to Use tmux

Best Fit

  • Monitoring AI coding sessions — poll Claude Code or Codex panes to detect prompts awaiting approval and respond automatically.
  • Sending input to interactive TUI applications — safely dispatch text and special keystrokes to programs that cannot be driven by a simple shell command.
  • Scraping output from long-running processes — capture the last N lines or the full scrollback of any pane for inspection or logging.
  • Orchestrating parallel worker sessions — check status across multiple named sessions (e.g. worker-2 through worker-8) and dispatch tasks to each.

When Not to Use

  • Running one-off shell commands — use the exec tool directly instead; no tmux overhead needed.
  • Starting new background processes — use exec with background: true.
  • Non-interactive scripts — if the process doesn't need keyboard input, exec is simpler and more direct.
  • The target process is not running inside tmux — this skill only works with processes hosted in a tmux session.

Key Features

Pane Output Capture

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.

Keystroke & Special Key Sending

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.

Session & Window Navigation

List, select, rename, create, and kill tmux sessions and windows programmatically. Navigate between panes to focus the right target before sending input.

Claude Code / Codex Prompt Automation

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.

Parallel Session Orchestration

Loop over a named set of sessions to check status or dispatch tasks simultaneously, supporting workflows with multiple parallel worker sessions.

Use Cases

Automated Claude Code approval bot

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.

Parallel task dispatch to worker sessions

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.

Long-running process monitoring

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.

Interactive TUI control

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.

Connecting to VM...
npx clawhub@latest install tmux
16Current Installs
📦
v1.0.0Version

Requirements

tmux

FAQ

Reviews

0 reviews

Log in to write a review

No reviews yet. Be the first to share your experience!