# client-detached

Source: https://libtmux.org/en/tmux/3.2a/catalog/hooks/client-detached/

> Run when a client is detached

hook tmux3.2a

Run when a client is detached

* Scope

  session

* Set

  [`set-hook`](https://libtmux.org/en/tmux/3.2a/manual/set-hook/) `client-detached command`

* Read

  [`show-hooks`](https://libtmux.org/en/tmux/3.2a/manual/show-hooks/) `client-detached`

* Control mode

  Also sent to control clients as `%client-detached`

## Description[#](https://libtmux.org/en/tmux/3.2a/catalog/hooks/client-detached/#description)

Run when a client is detached

## Releases[#](https://libtmux.org/en/tmux/3.2a/catalog/hooks/client-detached/#releases)

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

## Source[#](https://libtmux.org/en/tmux/3.2a/catalog/hooks/client-detached/#source)

* Defined in

  [`options-table.c:1134`](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/options-table.c#L1134)

* Fired from

  * [`server-client.c:336`](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/server-client.c#L336) in `notify_client`

* C source reference

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

* CLI Manual

  [Original manual entry](https://libtmux.org/en/tmux/3.2a/manual/full/#hooks-client-detached)

## Used by[#](https://libtmux.org/en/tmux/3.2a/catalog/hooks/client-detached/#used-by)

Library documentation that names this hook.

* Rust

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

* Go

  [`tmux.ServerHookValues.ClientDetached`](https://libtmux.org/en/go/latest/reference/tmux-serverhookvalues-clientdetached/), [`tmux.SessionHookValues.ClientDetached`](https://libtmux.org/en/go/latest/reference/tmux-sessionhookvalues-clientdetached/)
