# LibTmux.Control.status/1

- **Module:** LibTmux
- **Package:** libtmux
- **Language:** Elixir
- **Kind:** function
- **Source:** https://github.com/libtmux/libtmux-elixir/blob/5bacf40788b43a5af27bb3656e727a921ba2db40/lib/libtmux/control.ex#L337
- **Page:** https://libtmux.org/en/elixir/pr-173/reference/libtmux-control-status-1/

```
status(control)
@spec status(t()) ::
        {:ok, connection_status()}
        | {:error, LibTmux.Error.t()}
```

Reads the pinned epoch's phase, identity and terminal diagnostics without I/O.

`terminal` is `nil` before a terminal report, or `:unavailable` when the
report is missing or an ended epoch has no report. A report contains `reason`, its error
`phase` and at most 8192 raw `stderr` bytes. Empty stderr means no bytes were
captured; the buffer may be incomplete and need not be UTF-8. It can contain
application data and is never logged automatically.

A terminal report can coexist with `:closing` or unknown cleanup. Its reason
is an observed cause, not necessarily the original cause, and does not alter
operation outcomes. Status fields are separate observations, not an atomic
snapshot. A replacement epoch starts without the old report; old handles
remain stale. Losing the status owner returns the existing context error.

See the [worked example](advanced-execution.html).

## Parameters

- `control` (`t()`)
