# session-created

Source: https://libtmux.org/en/tmux/latest/catalog/hooks/session-created/

> Run when a new session created.

hook tmux3.7c

Run when a new session created.

* Scope

  session

* Set

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

* Read

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

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

Run when a new session created.

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

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

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

* Defined in

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

* Fired from

  * [`cmd-new-session.c:328`](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-new-session.c#L328) in `notify_session`

* C source reference

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

* CLI Manual

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

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

Library documentation that names this hook.

* Rust

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

* Go

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