Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

tmux

$ tmux Community Med Risk
tmux · Files & Search · ISC · macos / linux

tmux manages persistent terminal sessions, windows, and split panes over a client-server socket architecture. Unlike purely interactive TUIs, tmux exposes rich non-interactive control commands (new-session -d, list-sessions -F, capture-pane -p, send-keys) ideal for running and inspecting long-lived dev servers.

FCRS-1.0 Score
86 /100
Good
Medium Confidence
Zero-Friction Install
brew install tmux
CLI vs MCP Decision CLI Preferred vs MCP

Detached session control and tmux capture-pane -p inspection run directly against the local socket faster and cleaner than an MCP wrapper.

Agent-Readiness Checklist

— JSON Output
✓ Field Filtering
✓ Non-Interactive
— Dry-Run
— Read-Only Mode
— NO_COLOR Clean
— Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 19 / 25

Highly scriptable client-server CLI (-d detached sessions, -F format strings, capture-pane -p, send-keys), though there is no native --json flag.

  • Detached -d mode and -F field formatting on list-* commands
  • capture-pane -p prints pane buffers cleanly to stdout
Trust & Safety 19 / 25

Read-only list-sessions and capture-pane are safe, while send-keys injects arbitrary commands into live shells and kill-server terminates all sessions.

  • send-keys and kill-session/kill-server can disrupt active user sessions
Setup & Portability 14 / 15

Ubiquitous on macOS, Linux, and BSD via Homebrew, apt, dnf, and pacman; Windows requires WSL or Cygwin.

  • Pre-installed or single-command install on virtually all Unix hosts
Utility & Efficiency 15 / 15

Gold standard for supervising long-running daemons, REPLs, and interactive TUIs from detached agent workflows.

  • Persistent detached sessions survive SSH drops and agent turns
Maintenance & Lineage 10 / 10

Canonical ISC-licensed Unix tool (tmux/tmux) maintained actively by Nicholas Marriott and contributors.

  • Decades-long stability and continuous upstream releases
Docs & Verifiability 9 / 10

Exhaustive tmux(1) man page and GitHub wiki documenting every target syntax, format variable, and command.

  • Complete manual page and wiki reference

Security, Auth & Guardrails

Auth Modes
No Auth
Credential Storage

None required; uses local Unix domain sockets in /tmp/tmux-* and config in ~/.tmux.conf.

Side Effects
Read-Only Local Write Destructive
Cost & Quotas

100% free, offline, and open-source (ISC).

Copyable Guardrail for CLAUDE.md / AGENTS.md
# tmux Agent Rules
- ALWAYS pass `-d` to `tmux new-session` so it never tries to attach interactively inside an agent shell.
- Use `tmux capture-pane -t <target> -p` to read logs and verify exact target session/pane names before calling `send-keys` or `kill-session`.

Agent-Ready Command Recipes

Safe Read-Only Queries

List active tmux sessions with custom format fields
tmux list-sessions -F "#{session_name}: #{session_windows} windows (attached=#{session_attached})"

Queries running session metadata using -F format variables without attaching to a TTY.

Capture recent scrollback output from a background pane
tmux capture-pane -t dev-server:0.0 -p -S -100

Prints the last 100 lines of pane dev-server:0.0 directly to stdout via -p non-interactively.

Controlled Writes & Previews

Start a detached background session safely
tmux new-session -d -s dev-server "npm run dev"

Launches a persistent detached (-d) session without taking over the caller's TTY.

Strengths for Agents

  • + Clean detached execution (-d), format filtering (-F), and stdout buffer capture (capture-pane -p).
  • + Ideal for supervising persistent dev servers and interactive REPLs across agent turns.

Caveats & Pitfalls

  • ! Calling new-session or attach without -d fails or blocks in non-TTY shells.
  • ! No native --json output and no native Windows support outside WSL.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI