# Libtmux.Operations.run_hook

- **Module:** Libtmux
- **Package:** libtmux
- **Language:** OCaml
- **Kind:** function
- **Source:** https://github.com/libtmux/libtmux-ocaml/blob/205dfda49742592b479247049d186956e4a4cfe9/lib/libtmux.mli#L1221
- **Public owner:** Libtmux
- **Page:** https://libtmux.org/en/ocaml/latest/reference/libtmux-operations-run_hook/

```
val run_hook : Options.scope -> string -> unit Command.t
```

Run the effective hook in an explicit session, window or pane context. A successful result follows completion of its synchronous command queue. Background work started by a hook has its own lifetime. A later hook failure returns an uncertain outcome; preceding effects remain. Named `@` hooks return `Unsupported` because tmux can hide their parse failures in the server log. Configuration and inspection remain available.

## Parameters

- `arg1` (`Options.scope`)
- `arg2` (`string`)
