read_output
Poll new output from a running command without sending input. Use after execute returns status='partial' for non-interactive commands.
Instructions
Poll new output from a running command without sending input. Use after
execute returns status="partial" for non-interactive commands (builds,
training loops, long searches).
Each call returns only output produced since the last read. When the
command finishes, status changes to "completed" and the command_id is
retired — further calls raise ValueError.
WHEN NOT TO USE: If the command expects input, use respond. If you
need to interrupt or send keys, use send_control.
PARAMETER GUIDANCE: pause_timeout is the primary dial — it controls
how long to wait when the command is silent. total_timeout only caps
actively streaming output and has no effect during silence.
ERRORS: Raises ValueError if command_id is invalid or already completed.
RETURNS:
- {"status": "partial", "output": str, "command_id": str}
- {"status": "completed", "output": str, "exit_code": int}
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| command_id | Yes | The command_id from a status='partial' response. Raises ValueError if invalid or already completed | |
| pause_timeout | No | Seconds of silence before returning. Primary dial for polling — raise it (e.g. 30, 60) for quiet jobs instead of total_timeout. Must be > 0 and ≤ total_timeout | |
| total_timeout | No | Hard cap on call duration in seconds. Only binds while output is streaming — silent polls return at pause_timeout. Must be ≥ pause_timeout |