Operating system set to macOS
Documentation jurisdiction set to United States
Sign inConnect Claude
API/schemas
Schema

TaskResponse

Task response model.

FieldTypeDescription
idrequiredstring (uuid)Task UUID
permakeystring | nullStable human-readable task/instance key for the nested deep-link URL .../cycles/{cycle}/instance/{permakey}. Null on legacy rows.
cycle_idrequiredstring (uuid)Parent cycle UUID
step_idstring | nullBlueprint step id this task corresponds to (FE OutputsViewer resolver)
step_indexrequiredintegerStep index in workflow
namerequiredstringTask name
typerequiredstringTask type (domain type for display: extraction, validation, etc.)
statusrequired"pending" | "planning" | "pending_approval" | "upload_document" | "running" | "paused" | "blocked" | "awaiting_approval" | "approved" | "rejected" | "done" | "completed" | "failed" | "skipped"Status for individual tasks. Database constraint: pending, running, paused, blocked, done, skipped, failed Additional API statuses: planning, pending_approval, awaiting_approval, approved, rejected, completed
pendingplanningpending_approvalupload_documentrunningpausedblockedawaiting_approvalapprovedrejecteddonecompletedfailedskipped
requires_approvalbooleanWhether task requires approval
gate_recordRunGateRecord | null—
descriptionstring | nullPlain-English description of what this step does, derived once at save time from the step definition and stored. NULL on legacy rows that were never derived.
input_dataobjectTask input
show nested
Empty object.
output_dataobjectTask output
show nested
Empty object.
error_messagestring | nullWhy this step did not complete, written for an accountant. Composed by src.workstreams.language — the raw engine/approver text is on error_details and is the only place it appears.
error_detailsstring | nullThe step's recorded reason, with ids, secrets, email addresses and file paths removed, shown under "This step stopped" on the run page.
started_atstring (date-time) | nullStart timestamp
completed_atstring (date-time) | nullCompletion timestamp
approved_bystring (uuid) | nullApprover user ID
approved_atstring (date-time) | nullApproval timestamp
created_atrequiredstring (date-time)Creation timestamp
updated_atrequiredstring (date-time)Last update timestamp
reasoning_summarystring | nullThe step's reasoning trace summary (workstreams.task.thinking_summary). NULL on older cycles or steps that recorded no reasoning.
tokens_inputinteger | nullInput tokens consumed by this step. NULL on legacy rows.
tokens_outputinteger | nullOutput tokens produced by this step. NULL on legacy rows.
duration_msinteger | nullWall-time of this step in ms (persisted duration_ms, else completed_at - started_at). NULL when not started / no timestamps.
customer_cost_gbpnumber | nullWhat this STEP cost the customer: its execution time x the organisation's hourly rate. Same figure as the cycle-level field of the same name, one grain finer. Named `customer_cost_gbp`, not `cost_gbp`: the wire-boundary contract bans any read model carrying a bare cost noun, because `cost_cents` (our token spend) must never reach a browser. A field called `cost_gbp` cannot be told apart from that at a glance, and the guard was right to refuse it. The value was already being computed and passed by _cycles.py and silently discarded, because no such field existed here.
toolstring | nullTool/action that performed this step (step_definition.tool, else the structural type). Drives the FE tool chip + payload typing.
summarystring | nullOne accountant-English line authored at step completion (e.g. 'Read Doc 1 — 36pp · 4s'); the honesty line when no judgment was recorded. Server-capped < 500 chars; never a dump.
payload_refstring | nullcontent_uri reference to this step's raw payload: 'inline:<base64>' when <= 8 KB, else 'workstreams://step/{id}/payload' resolved by GET /cycles/{cycle_id}/steps/{step_id}/payload. Absent when the step produced no payload.
payload_size_bytesinteger | nullByte size of the raw payload (UTF-8 JSON) — the UI's size hint for the Show-payload disclosure. Null when no payload, and null when the step's stored outputs are over 8192 bytes (they are not read to size them; the size arrives as `size_bytes` from the payload address). Exact for every other step, and for every step under `?include=payloads`.
orphanedbooleanTrue only when the step's own cycle is cancelled, the step is failed, and the finalising sweep closed it (stored error_context.orphaned is true and error_context.message starts with 'orphaned:'). Distinguishes a step cut off mid-flight by the cancellation from one that failed on its own; the stored status is unchanged. False in every other case, including every row that predates the sweep.