# tmux.Pane.SetHooks

- **Module:** tmux.Pane
- **Package:** github.com/libtmux/libtmux-go/tmux
- **Language:** Go
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-go/blob/5f808882015a975a65acc7f9da5b3ff0d5cbdc91/tmux/hook_runtime.go#L482
- **Page:** https://libtmux.org/reference/go/tmux-pane-sethooks/

```
tmux.Pane.SetHooks(ctx: context.Context, name: string, values: SparseArray[string], options: SetHooksOptions) -> (SetHooksResult, error)
```

SetHooks applies indexed pane hook commands in ascending order at this handle's exact pane target. With ClearExisting it confirms clearing first, stops at the first failure without rollback, and reports confirmed progress. Cancellation may follow accepted commands and cannot disprove their delivery.
