Skip to main content
Every error has the same body. Branch on error. Show message to a person.

Success codes

Task routes return two success codes. Both bodies carry task_id. Starting with POST /task or /task/start always returns immediately; their compatibility wait body field does not make a start request block. POST /task/{task_id}/continue and /execute also return immediately by default. Their legacy wait: true body option blocks for the turn. Use integer wait values as bounded timeouts only on the GET status routes.

Codes

Status reads

GET /task/{task_id}, /state, and /stream return 503 service_unavailable when Autumn cannot read task state. Retry the request; do not treat this response as task_not_found. A 404 task_not_found means the task is actually missing.

Retry

Read retryable. Do not infer it from the status.
  • true: wait retry_after seconds when present, else a short backoff, then send the same request again.
  • false: the same request fails the same way. Change the request, key, balance or id first.

One turn at a time

A task runs one turn at a time. A continue submitted while it is running is queued and returns 202; if queueing is unavailable, the legacy 409 task_executing response is used. Execute is not queued while a turn is running. Serialize writes per task_id; use GET /task/{task_id}?wait=50 or the status stream to follow the current turn.

Terminal errors

402 out_of_credits on continue or execute means the turn did not start. The task stays in plan and does not resume when credits arrive: add credits, then send the request again. See Task lifecycle.

Streaming

After an SSE stream opens, a failure arrives as a beanstalk_error event, not an HTTP status. See Live messages.