Complete work

⚠️
Preview — this feature is being built; the design below is the spec.
POST https://app.syntic.ai/v1/runners/work/{work_id}/complete

Report the result of a work item. For a tool_call the output becomes the tool result the agent sees; mark it is_error when the command failed so the model can react. Output files written under /workspace/outputs can be uploaded with the Files API first and listed here.

For how this fits into a full workflow, see Self-hosted runners.

Headers

HeaderRequiredValue
AuthorizationYesBearer <runner token>: a self-hosted runner token (srt_...) issued when the runner was registered. Inference and admin keys are refused. See Self-hosted runners.
syntic-betaYes, while in previewagents-2026-11-01. Without it the call fails with 400 beta_required. See Versioning.
Content-TypeYesapplication/json

Path parameters

ParameterTypeDescription
work_idstringThe work item id, starting with work_.

Body parameters

ParameterTypeRequiredNotes
outputstringYes for tool_callUp to 100,000 characters; longer output is cut and marked as truncated.
is_errorbooleanNoDefault false.
exit_codeintegerNoShown to the agent with the output.
file_idsarray of stringsNoFiles to attach to the session’s outputs.

Response

200 OK, Content-Type: application/json

{
  "id": "work_01JCD3F5H7K9M1P3R5T7",
  "status": "completed",
  "completed_at": "2026-11-05T10:01:20Z"
}

Examples

curl -sS "https://app.syntic.ai/v1/runners/work/work_01JCD3F5H7K9M1P3R5T7/complete" \
  -H "Authorization: Bearer $SYNTIC_RUNNER_TOKEN" \
  -H "syntic-beta: agents-2026-11-01" \
  -H "Content-Type: application/json" \
  -d '{
      "output": "2212 invoices checked, 14 mismatches written to /workspace/outputs/mismatches.csv",
      "exit_code": 0,
      "file_ids": [
        "file_01JC3D5F7H9K1M3P5R7T"
      ]
    }'

Errors

Errors use the error envelope and carry a request_id. Codes specific to this operation:

StatustypecodeWhen
400invalid_request_errorbeta_requiredThe syntic-beta header is missing.
409conflict_errorlease_lostThe lease expired; another runner may already be running it.
404not_found_errorwork_not_foundNo work item with this id leased to this runner.
429rate_limit_errorrate_limitedToo many requests; wait for Retry-After. See Rate-limit headers.
Was this page helpful?