# pane-died

Source: https://libtmux.org/en/tmux/latest/catalog/hooks/pane-died/

> Run when the program running in a pane exits, but remain-on-exit is on so the pane has not closed.

hook tmux3.7c

Run when the program running in a pane exits, but remain-on-exit is on so the pane has not closed.

* Scope

  window, pane

* Set

  [`set-hook`](https://libtmux.org/en/tmux/latest/manual/set-hook/) `pane-died command`

* Read

  [`show-hooks`](https://libtmux.org/en/tmux/latest/manual/show-hooks/) `pane-died`

## Description[#](https://libtmux.org/en/tmux/latest/catalog/hooks/pane-died/#description)

Run when the program running in a pane exits, but [`remain-on-exit`](https://libtmux.org/en/tmux/latest/catalog/options/remain-on-exit/) is on so the pane has not closed.

## Releases[#](https://libtmux.org/en/tmux/latest/catalog/hooks/pane-died/#releases)

* [tmux 3.7c](https://libtmux.org/en/tmux/3.7c/catalog/hooks/pane-died/) : present
* [tmux 3.2a](https://libtmux.org/en/tmux/3.2a/catalog/hooks/pane-died/) : present

## Source[#](https://libtmux.org/en/tmux/latest/catalog/hooks/pane-died/#source)

* Defined in

  [`options-table.c:1694`](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/options-table.c#L1694)

* Fired from

  * [`server-fn.c:354`](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/server-fn.c#L354) in `notify_pane`

* C source reference

  [`options_table`](https://libtmux.org/en/tmux/latest/reference/c-variable-options_table/), [`notify_pane`](https://libtmux.org/en/tmux/latest/reference/c-function-notify_pane/)

* CLI Manual

  [Original manual entry](https://libtmux.org/en/tmux/latest/manual/full/#hooks-pane-died)

## Used by[#](https://libtmux.org/en/tmux/latest/catalog/hooks/pane-died/#used-by)

Library documentation that names this hook.

* Rust

  [`options.generated.PANE_DIED`](https://libtmux.org/en/rs/latest/reference/options-generated-pane_died/)

* Go

  [`tmux.PaneHookValues.PaneDied`](https://libtmux.org/en/go/latest/reference/tmux-panehookvalues-panedied/), [`tmux.WindowHookValues.PaneDied`](https://libtmux.org/en/go/latest/reference/tmux-windowhookvalues-panedied/)
