# LibTmux.PsmuxWindow.GetPanesAsync

- **Module:** LibTmux.PsmuxWindow
- **Package:** LibTmux
- **Language:** .NET
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-dotnet/blob/6656a563ec9e07ab52e0c3ac96f7704fc94cc0c0/src/LibTmux/Psmux/PsmuxWindow.cs#L58
- **Page:** https://libtmux.org/reference/dotnet/libtmux-psmuxwindow-getpanesasync/

```
LibTmux.PsmuxWindow.GetPanesAsync(cancellationToken: CancellationToken) -> Task<IReadOnlyList<PsmuxPane>>
```

Reads the window's current panes.

## Parameters

- `cancellationToken` (CancellationToken) — Cancels the psmux query.

## Returns

Current immutable pane observations.

## Raises

- `InvalidOperationException` — The selected namespace has no live session.
- `StaleServerGenerationException` — The sole session was replaced after this observation was read.
- `NotSupportedException` — The selected namespace contains more than one session.
- `TmuxObjectNotFoundException` — The observed window is no longer visible.
- `LibTmuxException` — The verified client could not complete the query.
