tmux_respawn_window
Restart a tmux window's command in place, optionally force-restarting a live window with custom command, directory, and environment variables.
Instructions
Restart the command in a window (respawn-window), reusing it in place.
Like tmux_respawn_pane but for a whole window (its single/first pane).
By default tmux only respawns a window whose command has exited; set
kill=True (-k) to force-restart a live one. command defaults to the
window's original command; start_directory sets its cwd (-c). env
(-e KEY=VAL, tmux 3.0+) injects environment variables; ignored with a
note on older tmux.
Returns {"respawned": True, "window": window}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| window | Yes | ||
| command | No | ||
| kill | No | ||
| start_directory | No | ||
| env | No | ||
| target | No |