# libtmux:respawn-window

- **Package:** libtmux
- **Language:** Common Lisp
- **Kind:** function
- **Source:** https://github.com/libtmux/libtmux-lisp/blob/c2e5fc4ed3befda21f45dfa5d5868c38fd138311/src/process-operations.lisp#L28
- **Public owner:** libtmux
- **Page:** https://libtmux.org/en/lisp/latest/reference/libtmux-respawn-window/

```
(respawn-window client window &key kill cwd environment (observe t) (command nil command-p) (shell-command nil shell-command-p) cancel-token timeout output-limit)
```

Restart WINDOW as one pane and return a COMMAND-OUTCOME.
KILL explicitly replaces running processes. Tmux retains its first pane and
destroys every other pane in the physical window, including through other links.
Other options follow RESPAWN-PANE. OBSERVE supplies a replacement window without
changing earlier observations. Linked-window session context is selected by tmux.
Signals STALE-TARGET or an operational condition; never retries the restart.

## Parameters

- `client`
- `window`
- `kill?`
- `cwd?`
- `environment?`
- `observe?`
- `command?`
- `shell-command?`
- `cancel-token?`
- `timeout?`
- `output-limit?`

## tmux command

The tmux commands behind `respawn-window`.

- [`respawn-pane`](/en/tmux/latest/manual/respawn-pane/)
- [`respawn-window`](/en/tmux/latest/manual/respawn-window/)

## tmux C API

The C declarations in tmux that implement these commands.

- [`cmd_respawn_pane_entry`](/en/tmux/latest/reference/c-variable-cmd_respawn_pane_entry/) (attribute)
- [`cmd_respawn_pane_exec`](/en/tmux/latest/reference/c-function-cmd-respawn-pane-c-cmd_respawn_pane_exec/) (function)
- [`cmd_respawn_window_entry`](/en/tmux/latest/reference/c-variable-cmd_respawn_window_entry/) (attribute)
- [`cmd_respawn_window_exec`](/en/tmux/latest/reference/c-function-cmd-respawn-window-c-cmd_respawn_window_exec/) (function)

## Guides

Pages that discuss `respawn-window`.

- [Explicit operations](/en/lisp/latest/guides/operations/)
