| name | tmux |
| description | Use when interacting with TUI applications, or running processes that require stdin interaction. For non-interactive long-running tasks, prefer pueue instead. |
Tmux
Overview
Claude controls tmux via CLI commands. Use for tasks that persist, run in background, or require interaction with running processes.
When to Use
Use tmux if ANY condition is met:
- Need to interact with running process (TUI apps, prompts, stdin)
- User requests to split pane (when inside tmux)
- Task must persist AND user needs to attach interactively
For non-interactive long-running tasks: prefer pueue (better status tracking, JSON output, dependencies)
For simple background tasks: use Bash tool's run_in_background parameter
Safety Constraints (CRITICAL)
- NEVER kill or send-keys to sessions not created in current conversation
- NEVER run
tmux kill-server or tmux attach
- Be careful with interactive apps (htop, btop) - avoid keys that may kill processes (F9, k)
- Do not start interactive editors (vim, nvim) - use Edit tools instead
- Do not start a new
claude instance unless explicitly instructed
- Use
claude- prefix for all session names
- Remember which sessions you created
- If unsure about ownership, leave it and inform user
Session Naming
Prefix all sessions with claude- to identify ownership:
tmux new-session -d -s claude-build
tmux new-session -d -s claude-dev-server
Detecting if Inside tmux