Poll a long-running task
ssh_task_pollPoll a background SSH command's task state and read new stdout/stderr increments from byte offsets without blocking; pass prior nextOffset values to continue streaming output.
Instructions
Returns task state and reads stdout/stderr increments from independent byte offsets. Returns running immediately when there is no new output; it never blocks. Pass stdoutAfterOffset / stderrAfterOffset and use the returned nextOffset of each stream; gaps from buffer recycling are reported in the droppedBeforeOffset of that stream.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"taskId": "<taskId>"
},
"name": "ssh_task_poll"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| taskId | Yes | ||
| maxBytes | No | Maximum bytes returned per stream in this call | |
| outputFormat | No | text puts content in text, structured puts it in structuredContent, both keeps the legacy shape | text |
| stderrAfterOffset | No | stderr nextOffset from the previous poll; use 0 on the first call | |
| stdoutAfterOffset | No | stdout nextOffset from the previous poll; use 0 on the first call |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | No | ||
| state | Yes | ||
| buffer | Yes | ||
| signal | Yes | ||
| stderr | Yes | ||
| stdout | Yes | ||
| taskId | Yes | ||
| endedAt | Yes | ||
| exitCode | Yes | ||
| startedAt | Yes | ||
| updatedAt | Yes | ||
| connectionId | Yes | ||
| cancelRequested | Yes |