Loading...
Loading...
Mechanics library for running AI coding CLIs as managed tmux workers via agent-tmux <cli> <command> (plus tmux-agent-sessions and the other bundled tools). Entry point is the using-tmux-agent-tools router skill — route through it first; read this skill for wrapper mechanics it defers to. Covers start/send-wait/status/result/stop, structured result.json completion, multi-worker watch, profiles for custom CLIs, and bounded dialogue/fanout. Not for general tmux config, theming, non-tmux headless CLI use, or human team debate.
npx skill4agent add ohyeh/tmux-agent-tools tmux-agent-toolstmuxagent-tmux <cli>send-waitstatusresultcapturestoptmux-agent-sessions listtmux lstmuxsendsendsend-waitsleepwatch --any|--all|--count <n> --timeout <s> --json …reason:result_updatedtmux-agent-sessionsresult initsend-waitresult wait-requiredresult initreferences/multi-agent.md#persistent-teammates-worker-reusestartcapturestatusstart --headlessclaude -pcodex exec<skill-dir>/scripts/agent-tmux codex …references/core-workflow.md#5-read-the-agents-structured-resultusing-tmux-agent-toolsreferences/core-workflow.mdagent-tmux <cli> assign <name> <dir> <prompt-file>assignstatuscaptureprobeassignassign --detachresult wait-required --wait <s>delegation-templatesbin=…doctor --jsonstart --dry-runreferences/profiles.mdagent-tmux <cli> <command>claude-tmuxcodex-tmuxagy-tmuxagent-tmux <cli> <command><repo-dir>/skills/tmux-agent-tools/scripts~/.agents/skills/tmux-agent-tools/scripts~/.claude/skills/tmux-agent-tools/scripts~/.codex/skills/tmux-agent-tools/scriptsagent-tmux <cli> setupevalsh -c--secret KEY=URIresult.jsonwatch| Need | Use |
|---|---|
| Run Claude Code / Codex / agy as a worker | |
| Any other CLI (gemini, cursor, grok, custom) | |
| Any worker, including bounded one-shots | interactive |
| Trivially verifiable fire-and-collect, user opted in | |
| Local working directory | |
| Repo on another host, tmux stays local | |
| Pin a model for one run | |
| Continue an existing CLI session UUID | |
| Don't know which wrapper owns a session | |
| Two-party exchange / one-to-many work | |
| Read-only inventory or evidence polling | |
start --exact --model <m> <name> <dir>references/cheatsheets.md# Dispatch a prompt-file task: ONE command runs the whole verified sequence
# (start -> result init -> send --from-file -> confirm the pane is processing
# -> blocking supervise). Prefer this over hand-chaining the steps; it cannot
# be misordered and it catches "task never reached the CLI" before waiting.
agent-tmux codex assign job ~/repo /abs/path/prompt.txt
# Bounded one-shot (headed by default; add --headless only when the user opted in):
agent-tmux codex start --exact job ~/repo 'Task. Write final JSON to the wrapper-provided result path when done.'
agent-tmux codex result wait-required job --fields status,summary --wait 600 --json # returns at process exit
agent-tmux codex supervise --result-required --silent-while-unchanged --json job # one silent call until terminal event
agent-tmux codex stop job
# Interactive one-worker flow (only when follow-ups are needed): start -> send-wait -> supervise -> stop.
agent-tmux codex start --exact worker ~/repo 'Task. Write final JSON to the wrapper-provided result path when done.'
agent-tmux codex send-wait worker 'Follow-up instruction.' 180
agent-tmux codex status --json worker
agent-tmux codex result --json --wait 30 worker
agent-tmux codex stop worker
# Multiple workers: block on first/all/N completion with one bounded call.
agent-tmux codex watch --any --timeout 600 --json w1 w2 w3references/core-workflow.md$TMUX_AGENT_DIR/<name>/result.jsonschema_version: 1statussuccess|failed|blocked|needs-inputsummaryartifactserrorsverdictdecision$TMUX_AGENT_RESULT.present -> .valid -> .bodyagent-tmux codex result --json --wait 30 worker
agent-tmux codex supervise --result-required --silent-while-unchanged --json worker.present:falseresult --path <name>status --jsonreferences/contracts.md--dangerously-skip-permissions--yolostatus --jsonconfirmation_detected:trueblocked_reasonreferences/multi-agent.md--secret KEY=URITMUX_AGENT_TOOLS_AUDIT_LOGreferences/security.mdreferences/core-workflow.mdreferences/profiles.mdreferences/cheatsheets.mdreferences/multi-agent.mdreferences/contracts.mdstatus --jsonresult.jsonreferences/security.mdreferences/troubleshooting.mdreferences/recipes.mdschemas/result-status-summary.schema.jsonfanout-summary.schema.jsonresult.jsonagents/tmux-delegate.mdclaude-oneshot.mdcodex-oneshot.mdusing-tmux-agent-tools~/.claude/agents/