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, ) Capture
Since Result -
Capture new tmux terminal scrollback since the previous cursor.
Description#
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=Nonereturns 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=Trueand a fresh cursor. Malformed cursors, cursors for a different pane, pane death, and pane respawn fail withExpectedToolErrorso agents do not accidentally observe the wrong process.- Parameters
-
-
cursor(str | None) # – Opaque cursor returned by a priorcapture_sincecall. When omitted, the tool captures the current visible screen and starts a new cursor. -
pane_id(str | None) # – Pane ID (e.g. '%1'). Optional whencursoris 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. -
max_lines(int | None) # – Maximum number of lines to return. Defaults toCAPTURE_SINCE_DEFAULT_MAX_LINES. PassNoneto disable line truncation. -
max_bytes(int | None) # – Maximum UTF-8 bytes to return acrosslines. Defaults toCAPTURE_SINCE_DEFAULT_MAX_BYTES. PassNoneto disable byte truncation. -
socket_name(str | None) # – tmux socket name.
-
- Returns
-
CaptureSinceResult Structured lines, cursor, elapsed time, and truncation/loss metadata.
Discussed in Python MCP examples , Python MCP topics