# LibTmux.Mcp.PaneActivityHub.WatchAsync

- **Module:** LibTmux.Mcp.PaneActivityHub
- **Package:** LibTmux.Mcp
- **Language:** .NET
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-dotnet/blob/320dc64f4b8b7815842471327a5e6b84a1499bf8/src/LibTmux.Mcp/Streaming/PaneActivityHub.cs#L98
- **Page:** https://libtmux.org/en/dotnet/latest/mcp/reference/libtmux-mcp-paneactivityhub-watchasync/

```
LibTmux.Mcp.PaneActivityHub.WatchAsync(pane: Pane, cancellationToken: CancellationToken) -> Task<IAsyncDisposable>
```

Watches a pane's session for as long as the result is held.

Take one of these around a wait. Without it the wait still works, by
polling; with it, tmux does the waiting.

## Parameters

- `pane` (Pane): The pane whose session to watch.
- `cancellationToken` (CancellationToken): Cancels starting the control client.

## Returns

A lease that stops watching when disposed.
