# LibTmux.Capture

- **Module:** LibTmux
- **Package:** libtmux
- **Language:** Elixir
- **Kind:** module
- **Source:** https://github.com/libtmux/libtmux-elixir/blob/66b9b1c3f3f3186428abdfda2c76f5cf87446710/lib/libtmux/capture.ex#L1
- **Page:** https://libtmux.org/en/elixir/latest/reference/libtmux-capture/

Builds a bounded one-shot observation of one existing Linux tmux server.

Capture checks topology and OS server identity before and after field
reads. Attempts share the original deadline and work budgets; `attempts`
defaults to 2 and accepts 1–3. Only inconsistent topology or disappearing
read targets retry. Decoding and coverage errors remain visible.

Defaults: 1024 contextual entity rows, 512 commands, 8 MiB total response
bytes, 64 KiB per response and 5000 ms. Exceeding a ceiling returns an
error, never a partial success. Linked rows count against the work limit.
Free-form fields share one encoded response per physical entity, including
its framing overhead. One successful attempt uses `10 + S + W + P`
commands for S sessions, W physical windows and P panes.
Capture adds no control attachment. Hooks configured on list commands can
still have effects; retries do not replay application mutations.

## Members

### Other members

- [`fetch/2`](/en/elixir/latest/reference/libtmux-capture-fetch-2/) (function): Performs bounded capture through an explicit server descriptor.
- [`option/0`](/en/elixir/latest/reference/libtmux-capture-option-0/) (typealias): Capture-wide budgets shared by all attempts and reads.
