tail_shell_output
Retrieve recent lines from a running shell process's output. Optionally drain the buffer to see only new output on subsequent calls.
Instructions
Return the most recent lines from a spawned process's output.
Args:
proc_id: From spawn_shell.
n_lines: How many recent lines to return (capped at 500).
stream: 'stdout', 'stderr', or 'both'.
drain: If True, remove returned lines from the buffer so the
next call sees only NEW output. Useful for polling loops.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| drain | No | ||
| stream | No | both | |
| n_lines | No | ||
| proc_id | Yes |