Tmux tools for pi to run long-running commands and control panes by lock name.
- Must be running inside a tmux session (
TMUXenv var set) - tmux must be installed
- pi-semaphore should be installed
pi install git:github.com/offline-ant/pi-tmuxOr try without installing:
pi -e git:github.com/offline-ant/pi-tmux| Tool | Description |
|---|---|
tmux-bash |
Create a new tmux pane with a lock name and execute a command (defaults to bash) |
tmux-capture |
Capture output from a pane by lock name or pane id |
tmux-send |
Send text or keys to a pane by lock name or pane id; for coordinated workflows, pair with semaphore_wait on the same lock name (unless the command launches a nested pi, then wait on the inner lock) |
tmux-kill |
Kill a pane by lock name or pane id |
tmux-coding-agent |
Spawn a pi coding agent in a pane and return startup output |
minitask |
Run multiple independent questions/tasks through pi -p in serial and return <question>/<answer> blocks |
tmux-bash creates a lock in /tmp/pi-semaphores/<name>.
- The lock file content is the tmux pane id (for example
%42) - Control tools resolve
<name> -> pane idand target that pane - When the command exits, the lock is removed and
idle:<name>is written
This allows any agent in the same tmux server to control panes it did not spawn, as long as it knows the lock name.
- Start:
tmux-bashwith nameworkerand commandnpm run dev - Capture:
tmux-capturewith nameworker - Send keys:
tmux-sendwith nameworkerand textC-c - Kill:
tmux-killwith nameworker
Spawn a coding agent:
tmux-coding-agentwith namereviewer, folder../projecttmux-sendwith namereviewerand textanalyze lint failuressemaphore_waitwith namereviewer
tmux-coding-agent runs pi without model arguments unless piArgs is set, so it uses pi's saved last active model by default. Pass --provider/--model in piArgs only when you want to override that selection.
Run independent quick tasks:
minitaskwithquestions: ["What is module X?", "Give a one-line status of task Y"]- Read
<question>...</question><answer>...</answer>blocks from output
This extension blocks git restore when invoked through:
- built-in
bash tmux-bashtmux-send
Blocked calls are denied before execution. Other work might be in progress; ask the user to resolve the issue if necessary.
/tmux-listlists active tmux panes/supervise <task>spawns a supervised coding agent workflow: writes a task file to./dev/scratch/<id>/task.md, then turns the current agent into a supervisor that spawns a 'main' agent to do the work. The supervisor keeps the main agent on track, enforces the >78% context handoff rule, and ensures architectural quality over speed — nudging the main agent to investigate properly and build well-structured solutions rather than rushing to quick fixes. The main agent is unaware it has a supervisor.
MIT