feat: add rtk tmux wrapper for capture-pane and send-keys
Problem
Multi-pane tmux orchestration is a common pattern for Claude Code worker pools (e.g. CTO ↔ Worker-1 ↔ Worker-2/3). Two tmux commands dominate this workflow:
tmux capture-pane -t <target> -p — read another pane's output (often 100+ lines of build logs, test failures, etc.)
tmux send-keys -t <target> ... — dispatch commands (short input, but spam-counted)
Measured impact (gma-ios, 30 days via rtk discover)
Command Count Example
tmux capture-pane 265 tmux capture-pane -t gma:1.2 -p
tmux send-keys 149 tmux send-keys -t gma:1.4 Escape
capture-pane is the costly one — it often returns 200+ lines of stale log output where the LLM only needs the last 20 lines or a specific anchor (e.g. last "DONE" / "ERROR" marker).
Proposed solution
Add rtk tmux subcommand with:
capture-pane filters:
- Default to last N=50 lines (override with
-S -200 flag — pass through native)
- Add
--since-marker <regex> to capture only output after a specific marker
- Strip blank trailing lines (tmux pads to pane height)
send-keys filters:
- Suppress output entirely on success (it has no meaningful return)
- Only print on error
Example before/after
Before (tmux capture-pane -t gma:1.2 -p, ~150 lines / ~3KB):
[120 lines of stale starship prompt + old build output]
...
❯ /leader /tmp/wo-foo-brief.md
[20 lines of leader analysis]
❯
After (rtk tmux capture-pane -t gma:1.2 -p, ~25 lines / ~500 bytes):
- Last 50 lines, trailing blanks stripped → focuses LLM on recent activity
Why useful
Worker-pool / agent-orchestration patterns are growing in Claude Code (RTK's own discover history shows it). capture-pane token waste compounds — every poll burns context.
Environment
- RTK 0.40.0 (Homebrew, macOS arm64)
- Use case: gma-ios — 4-pane tmux harness for AI worker orchestration
feat: add
rtk tmuxwrapper forcapture-paneandsend-keysProblem
Multi-pane tmux orchestration is a common pattern for Claude Code worker pools (e.g. CTO ↔ Worker-1 ↔ Worker-2/3). Two tmux commands dominate this workflow:
tmux capture-pane -t <target> -p— read another pane's output (often 100+ lines of build logs, test failures, etc.)tmux send-keys -t <target> ...— dispatch commands (short input, but spam-counted)Measured impact (gma-ios, 30 days via
rtk discover)capture-paneis the costly one — it often returns 200+ lines of stale log output where the LLM only needs the last 20 lines or a specific anchor (e.g. last "DONE" / "ERROR" marker).Proposed solution
Add
rtk tmuxsubcommand with:capture-panefilters:-S -200flag — pass through native)--since-marker <regex>to capture only output after a specific markersend-keysfilters:Example before/after
Before (
tmux capture-pane -t gma:1.2 -p, ~150 lines / ~3KB):After (
rtk tmux capture-pane -t gma:1.2 -p, ~25 lines / ~500 bytes):Why useful
Worker-pool / agent-orchestration patterns are growing in Claude Code (RTK's own discover history shows it).
capture-panetoken waste compounds — every poll burns context.Environment