# libtmux:respawn-pane

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

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

Restart PANE's process and return a COMMAND-OUTCOME.
KILL explicitly replaces a running process; otherwise tmux requires it to have
exited. Omit COMMAND and SHELL-COMMAND to reuse the previous command. Explicit
argv, shell text, literal CWD and ENVIRONMENT follow NEW-WINDOW. OBSERVE returns
a replacement pane through OUTCOME-VALUE; its earlier capture stays unchanged.
The process may exit before observation. Signals STALE-TARGET or an operational
condition; never retries an uncertain restart.

## Parameters

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

## tmux command

The tmux commands behind `respawn-pane`.

- [`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-pane`.

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