tmux_run
Execute a shell command in a tmux pane and retrieve its output and exit code using marker-based capture for reliable results.
Instructions
Run a shell command in a pane and return just its output + exit code.
Types command into the pane bracketed by unique markers, then polls
until the command finishes, and returns the text printed between the
markers. This is the reliable alternative to send-keys + sleep + capture.
Intended for NON-interactive commands at a shell prompt. Returns {"completed", "exit_code", "output", "elapsed"}; on timeout, completed is False and output holds the raw capture so far.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| target_pane | Yes | ||
| command | Yes | ||
| timeout | No | ||
| history | No | ||
| poll_interval | No | ||
| target | No |