Tmux is deeply integrated into arthack as the primary session management layer for agent workflows. The system spans a dedicated CLI (tmuxctl), tmux config files, Claude Code hooks/skills/commands, and cross-tool integrations that tag every agent session with its tmux coordinates.
apps/tmuxctl/ — 14 subcommands, ~627 lines in cli.py
| Subcommand | Purpose |
|---|---|
create-session NAME |
Create detached session with optional --dir, --cmd, --window-name |
load-session LAYOUT |
Load session from YAML layout in ~/.config/tmuxctl/layouts/ |
run-command TARGET CMD |
One-shot: send keys, wait for prompt, capture output |
run-claude |
Launch Claude Code in tmux with plan mode, --skip-commit defaults |
run-commit ARGS |
Interactive commit wrapper with output logging |
wait-for TARGET PATTERN |
Poll pane for regex match, optional --then-send |
send-keys TARGET KEYS |
Send keystrokes (--enter/--no-enter, --literal, --delay) |
capture-pane TARGET |
Read pane content (--lines N, --full) |
create-split CMD |
Split along longest axis, returns YAML metadata |
check-pane TARGET |
Query pane status (alive, pid, command) |
show-tree |
Session/window/pane tree with real foreground processes |
tail-panes |
Tail of all panes in a session |
triangulate-self |
Print current pane's tmux context as YAML |
show-diff |
Show git diff in critique or delta viewer |
Pane targeting format: SESSION[:WINDOW[.PANE]], 1-based indexing. Sessions prefixed _ are hidden by default.
Each subcommand has a dedicated run_*.py module (14 total).
system/tmux/.config/tmux/conf.d/ — three config fragments, stowed to ~/.config/tmux/ by scripts/install.sh:
| File | What it does |
|---|---|
arthack-commit.conf |
prefix G → split pane for tmuxctl run-commit; prefix H → split for tmuxctl show-diff |
arthack-session-id.conf |
Hooks (window-layout-changed, after-rename-session, window-unlinked) that call hookctl sync-tmux to keep job-tracker DB in sync with tmux layout changes |
devctl.conf |
Alt+p FZF project picker, Alt+f file chooser, Alt+t transcript chooser — all as tmux popups |
Every Claude Code session gets tagged with tmux coordinates on start:
- Runs
tmux display-message -p "#{session_name}\x1e#{window_index}\x1e#{pane_index}" - Writes
tmux_session,tmux_window,tmux_paneto the hooks-tracker SQLite DB
Template variables for notification messages: {job.tmux_session}, {job.tmux_window}, {job.tmux_pane}, {job.tmux_target} (formatted as main:1.0)
Command advice for tmuxctl usage patterns:
- Prefer
run-commandoversend-keys+capture-pane - Use
create-splitfor panes, nevercreate-session - Verify with
check-paneorcapture-paneafter splitting - Target by session name, not
session:1 - Use
send-keys --no-enterfor interactive prompts
claude/work/skills/tmux/SKILL.md — work:tmux
Loaded when working with tmux, interactive terminals, TUI programs, or full shell environments. Includes a reference doc (references/tmux-commands.md) covering session management, window management, targeting syntax, pane management, and common patterns (split+verify, send+wait+capture, polling, interactive prompts).
| Tool | How it uses tmux |
|---|---|
| jobctl | Auto-scopes to current tmux/prise session. show-job (no args) auto-selects job in current window. list-jobs scopes to current session by default. |
| devctl | choose-project ensures a work tmux session exists, loads from work.yaml layout via tmuxctl load-session, creates per-project windows |
| wirectl | Enriches wire registry with jobctl data including tmux/prise targets |
| fixctl | Captures current tmux pane output to diagnose errors |
| keyctl | Parses tmux keybindings from ~/.config/tmux/tmux.conf + conf.d/*.conf as layer 3 in its binding inventory |
| prisectl | Parallel implementation for prise multiplexer — run-claude, start-pty, same architecture as tmuxctl for non-tmux environments |
| hookctl | sync-tmux subcommand keeps job DB in sync; place-pane for manual pane placement |
| Script | Purpose |
|---|---|
scripts/demo-tmuxctl.sh |
Speed benchmark — creates session, runs commands, launches Claude, times each step |
scripts/install.sh |
stow_system tmux links config from system/tmux/.config/tmux/ to ~/.config/tmux/ |
Tmux context is loaded into most agent workflows via the tmuxctl tool listing in command partials. The /develop, /research, /report, /iterate, /grind, /foster, /adopt, and /prise-* command families all have access to tmuxctl subcommands.
Claude starts in tmux
→ hooks-tracker captures session/window/pane to SQLite
→ tmux hooks fire hookctl sync-tmux on layout changes
→ jobctl reads DB to auto-detect current context
→ job-callbacks use {job.tmux_target} in notifications
→ wirectl enriches peer discovery with tmux targets
- prisectl is the parallel track — it mirrors tmuxctl's architecture for prise. Any new tmuxctl feature likely needs a prisectl equivalent.
- The session-id hook conf is the glue — it keeps the job DB accurate when panes move. If tmux layout tracking ever breaks, start debugging there.
run-commandis the canonical pattern — hookctl config actively steers agents away from rawsend-keys+capture-panetoward the one-shotrun-command. This is the most important convention to preserve.
cwd: /Users/mike/code/arthack
session-id: 2c30343d-686e-4c5d-9c61-d1e61f22c21b
session-name: arthack-tmux-inventory
path: /Users/mike/docs/tmux-features-inventory-2026-04-12.mdcd /Users/mike/code/arthack && claude --resume 2c30343d-686e-4c5d-9c61-d1e61f22c21b