Skip to content

tmux Session Control

Lets an agent read, type into, and manage tmux terminal sessions on macOS or Linux

Stars
11,367
Licence
MIT
Files
3 files

What it does

Once installed, the agent can look inside terminal sessions managed by tmux (a tool that keeps terminal windows running in the background). It can read what is currently shown on screen, type text or press keys such as Enter or Ctrl+C, list and create sessions, and wait until a particular line of text appears. This is mainly used to monitor and answer prompts from other interactive programs, such as parallel Claude Code or Codex sessions, that are running inside tmux.

Great for

  • Developers who run several interactive coding agents or CLI tools inside tmux and want an agent to check on them
  • People orchestrating multiple worker sessions who need to approve prompts or send follow-up tasks

Skip it if

  • Simple one-off shell commands or non-interactive scripts, which the skill itself says should use a normal exec tool instead
  • Anyone on Windows, since the skill only lists darwin (macOS) and linux as supported systems
  • Sensitive sessions: the agent can send keystrokes that approve permission prompts, so it can act in a terminal without review if misdirected

Try asking

  • “Check whether my worker-3 Claude Code session is waiting for a permission prompt and approve it if so”
  • “Show me the last 20 lines of the shared tmux session”
  • “Wait until the text 'Build succeeded' appears in session worker-5, then tell me”
  • “List all tmux sessions on the default socket and their status”
Step-by-step guide: how to use tmux Session ControlInstall, first run, examples, tips and FAQs

Install in 3 steps

  1. 1

    Download the skill

    The ZIP contains the 3 original files, the MIT licence and an attribution note.

    tmux.zip
  2. 2

    Add it to your agent

    Claude Code (all projects)

    mkdir -p ~/.claude/skills && unzip tmux.zip -d ~/.claude/skills/

    Claude Code / Agent SDK (this project only)

    mkdir -p .claude/skills && unzip tmux.zip -d .claude/skills/

    Claude apps (web/desktop): Settings → Capabilities → Skills → Upload skill, and choose the ZIP.

  3. 3

    Ask for the task

    No special command needed — the agent reads the skill's description and loads it when your request matches. Try one of the prompts above.

Get better results

  • Send text and Enter as separate commands with a short pause, as the SKILL.md recommends, to avoid paste problems in interactive apps
  • Review what the agent is about to send to a session before letting it approve prompts, since keystrokes can accept actions you did not intend
  • Use the provided find-sessions.sh and wait-for-text.sh scripts with explicit targets and timeouts rather than broad loops

What's inside

  • scripts/find-sessions.sh
  • scripts/wait-for-text.sh
  • SKILL.md

Redistributed unmodified from spinabot/brigade under the MIT licence. The assessment was drafted with AI from the skill's files on 2026-10-29. Skills can instruct your agent to run code — read SKILL.md and any scripts before installing.