Read pane output
read_paneFetch a terminal pane's output as raw bytes, rendered screen, or Claude conversation transcript, with waiting for idle and incremental reads.
Instructions
Read a pane's terminal output. mode:"transcript" (Claude panes only) returns the pane's actual CONVERSATION — the last messages user/assistant turns from the session transcript on disk, joined via the pane's session marker — the reliable way to read a claude pane (TUI screen scrapes are lossy). mode:"screen" returns the RENDERED cell grid (what's actually on screen — no overdraw, spinner spam, or mangled spacing) instead of the raw pty stream. Default "raw". tail limits to the last N lines; strip removes ANSI escape codes from a raw read. waitForIdle BLOCKS until the pane has been output-quiet for settleMs (default 600ms) or timeoutMs (default 30000ms) elapses — the way to read a reply without polling/sleeping. since is a byte cursor (use the cursor from a prior read) that returns only NEW output (raw mode), so you don't re-scrape the whole scrollback each turn. Every read returns the current cursor. For continuous streaming, subscribe to the pane's output resource instead.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | "transcript" = the claude pane's real conversation tail; "screen" = rendered cell grid; "raw" (default) = pty byte stream | |
| tail | No | ||
| since | No | byte cursor from a prior read's `cursor`; returns only output produced since | |
| strip | No | ||
| paneId | Yes | ||
| messages | No | transcript mode: how many trailing conversation messages to return (default 10) | |
| settleMs | No | quiet window that ends a waitForIdle read (default 600ms; raise for slow models) | |
| timeoutMs | No | max time to block on waitForIdle before returning what is there (default 30000ms) | |
| waitForIdle | No | block until the pane is output-quiet for settleMs (or timeoutMs) |