# tmux.Server.Snapshot

- **Module:** tmux.Server
- **Package:** github.com/libtmux/libtmux-go/tmux
- **Language:** Go
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-go/blob/52968a3181c1c9e6d1b26c565d4b170968ae61c0/tmux/snapshot_capture.go#L23
- **Page:** https://libtmux.org/en/go/latest/reference/tmux-server-snapshot/

```
tmux.Server.Snapshot(ctx: context.Context) -> (Snapshot, error)
```

Snapshot materializes sessions, winlinks, panes, and clients. Its sequential commands produce an observationally consistent result, not an atomic transaction. Failures remain errors rather than empty snapshots; cancellation may occur after earlier listings completed.

Identity probes reject a daemon replacement during subprocess collection.
A connection is already bound to the exact daemon and skips the closing
probe; the opening probe still selects version-specific fields.
