Poll a background task
get_taskStatus and NEW output of a background task: state (running | done | failed | killed | timeout), exit_code, and the stdout/stderr text produced since the offsets you pass. Start with offsets 0, then pass stdout_next_offset / stderr_next_offset from the previous response to get only new output. done: true means finished. Poll every few seconds; each call is quick. Up to 8 MiB per stream is retained (older output is dropped and reported in *_dropped). Requires: token.
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": {
"sandbox_id": "<sandbox_id>",
"task_id": "<task_id>"
},
"name": "get_task"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| task_id | Yes | Required. Task id returned by run_code / exec_command with background: true. | |
| sandbox_id | Yes | Required. Sandbox id as returned by create_sandbox / list_sandboxes, e.g. "sb_3f2a…". | |
| stderr_offset | No | Optional. Byte offset in stderr to read from, integer ≥ 0 (default 0); pass `stderr_next_offset` from the previous response. | |
| stdout_offset | No | Optional. Byte offset in stdout to read from, integer ≥ 0 (default 0); pass `stdout_next_offset` from the previous response. |