← ClaudeAtlas

tmux-agent-controllisted

Use this skill when ckl asks to inspect, queue work for, interrupt, spawn, replace, or otherwise drive another coding-agent CLI running inside tmux. Covers ARLE's known-safe tmux path for Codex/Claude Code delegation, including session discovery, capture-pane status checks, Enter semantics, long-brief buffer paste, queue-vs-immediate behavior, and don't-send-to-yourself safety.
acupof-ai/arle · ★ 19 · AI & Automation · score 77
Install: claude install-skill acupof-ai/arle
# tmux-agent-control Driving another coding-agent CLI (commonly Codex) that lives in a tmux session. Per CLAUDE.md §Delegation, this is the **only working execution path** for handing work to Codex from this project — the in-process subagent (`codex:codex-rescue`) and `mcp__openmax__execute_with_codex` both hang. The Codex review-via-Bash path (`codex review --uncommitted`) is unaffected and not what this skill covers. ## Quick reference ```bash # 1. Discover (sessions AND window indices — the latter is NOT always 0) tmux ls tmux list-windows -a # 2. Read state (last screen) tmux capture-pane -t <s>:<w> -p | tail -80 # 2b. Read state with history (for what scrolled off) tmux capture-pane -t <s>:<w> -S -200 -p | tail -200 # 3a. Send single-line message tmux send-keys -t <s>:<w> 'continue' Enter # 3b. Send short multi-line message (≤5 lines, no special chars) tmux send-keys -t <s>:<w> 'line one line two' Enter Enter # 3c. Send a LONG brief (>5 lines or special chars) via tmux buffer # send-keys with embedded newlines fails for long input — tmux throws # repeated "not in a mode" errors and drops keys. Use the buffer instead. cat > /tmp/brief.txt <<'EOF' Track X — full directive, can be 30+ lines, no escaping needed. EOF tmux load-buffer -b brief /tmp/brief.txt tmux paste-buffer -b brief -t <s>:<w> sleep 1 && tmux send-keys -t <s>:<w> Enter Enter Enter Enter # 3d. Spawn a peer Claude Code / Codex tmux new-session -d -s 6 -c /path/to/repo 'claude --allow-dangerous