# libtmux_mcp.tools.pane_tools.capture_since

- **Module:** libtmux_mcp.tools.pane_tools
- **Package:** libtmux-mcp
- **Language:** Python
- **Kind:** function
- **Source:** https://github.com/tmux-python/libtmux-mcp/blob/4daddc0dfca96c43bf521d818bf91564e1434760/src/libtmux_mcp/tools/pane_tools/capture_since.py#L429
- **Page:** https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-tools-pane_tools-capture_since/

```
libtmux_mcp.tools.pane_tools.capture_since(cursor: str | None = None, pane_id: str | None = None, session_name: str | None = None, session_id: str | None = None, window_id: str | None = None, max_lines: int | None = CAPTURE_SINCE_DEFAULT_MAX_LINES, max_bytes: int | None = CAPTURE_SINCE_DEFAULT_MAX_BYTES, socket_name: str | None = None) -> CaptureSinceResult
```

Capture new tmux terminal scrollback since the previous cursor.

Use for observation-first workflows: tailing a shell, watching a
long-running command, or repeatedly checking a tmux workspace pane
without re-sending the same visible screen every turn. The first
call with ``cursor=None`` returns the current visible pane and an
opaque cursor. Later calls pass that cursor back and receive only
rows written or rewritten after the cursor, as long as tmux still
retains the required scrollback history.

If tmux history was cleared or trimmed before the cursor anchor,
the tool returns the current visible pane with ``lines_missed=True``
and a fresh cursor. Malformed cursors, cursors for a different
pane, pane death, and pane respawn fail with ``ExpectedToolError`` so
agents do not accidentally observe the wrong process.

## Parameters

- `cursor` (str | None): Opaque cursor returned by a prior ``capture_since`` call. When
omitted, the tool captures the current visible screen and
starts a new cursor.
- `pane_id` (str | None): Pane ID (e.g. '%1'). Optional when ``cursor`` is supplied; the
cursor carries the original pane id.
- `session_name` (str | None): Session name for pane resolution.
- `session_id` (str | None): Session ID (e.g. '$1') for pane resolution.
- `window_id` (str | None): Window ID for pane resolution.
- `max_lines` (int | None): Maximum number of lines to return. Defaults to
``CAPTURE_SINCE_DEFAULT_MAX_LINES``. Pass ``None`` to
disable line truncation.
- `max_bytes` (int | None): Maximum UTF-8 bytes to return across ``lines``. Defaults to
``CAPTURE_SINCE_DEFAULT_MAX_BYTES``. Pass ``None`` to
disable byte truncation.
- `socket_name` (str | None): tmux socket name.

## Returns

CaptureSinceResult
    Structured lines, cursor, elapsed time, and truncation/loss
    metadata.
