Poll Task Status
poll_task_statusRetrieve the current status, duration, and recent output of a task. Returns notFound for unknown or pruned task IDs.
Instructions
Returns current status, duration, and the recent tail of streamed output for a task. Cheap; safe to call frequently. Returns notFound:true for unknown or pruned task IDs (never throws).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| taskId | Yes | ||
| tailLines | No | Cap the recentOutputLines tail. Default: full retained buffer. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | No | ||
| error | No | ||
| status | Yes | ||
| taskId | Yes | ||
| notFound | No | ||
| lineCount | Yes | Lifetime line count (may exceed recentOutputLines.length when ring buffer evicted older lines). | |
| startedAt | No | ||
| durationMs | Yes | ||
| finishedAt | No | ||
| cancelReason | No | ||
| recentOutputLines | Yes |