v6

latestOpenAPI 3.1.0raw.githubusercontent.com2026-08-01485121699.8 KB

Complete Task

Mark a task as done (or refused) from a worker terminal payload.

Structured payloads (body.payload or a JSON object embedded in result_summary) are validated against the worker completion contract (#2244): an invalid payload is a typed contract_violation failure carrying the schema error path, and a validated refusal lands the task in the terminal REFUSED state instead of DONE. Legacy prose summaries are accepted unchanged.

If result_summary is empty the task is auto-transitioned to FAILED with reason='completion missing summary' and a 422 is returned with the failed task payload so the client knows the slot was released.

post/tasks/{task_id}/complete

Path parameters

task_idstring required

Request body

result_summarystring
payloadobject nullable

Response

Successful Response

idstring required
titlestring required
descriptionstring required
rolestring required
tenant_idstring required
priorityinteger required
scopestring required
complexitystring required
eu_ai_act_riskstring required
approval_requiredboolean required
risk_levelstring required
estimated_minutesinteger nullable required
statusstring required
depends_onstring[] required
parent_task_idstring nullable required
depends_on_repostring nullable required
owned_filesstring[] required
assigned_agentstring nullable required
result_summarystring nullable required
cell_idstring nullable required
repostring nullable required
task_typestring required
upgrade_detailsobject nullable required
modelstring nullable required
effortstring nullable required
clistring nullable
batch_eligibleboolean
completion_signalsobject[]
slack_contextobject nullable
metadataobject
created_atnumber required
claimed_atnumber nullable
completed_atnumber nullable
closed_atnumber nullable
deadlinenumber nullable
versioninteger
parent_session_idstring nullable
retry_countinteger
max_retriesinteger
retry_delay_snumber
terminal_reasonstring nullable
max_output_tokensinteger nullable
meta_messagesstring[]
max_turnsinteger nullable