Format run stuck queued? Sume waiting vs runtime_unavailable

A queued Sume Format run reports queue.state waiting or runtime_unavailable, with position always null. A bash and jq check that reads the status route.

4 min readSume
All posts

What the status route tells you

A Format run is polled at GET /v1/format-runs/{id}/status. Besides status it returns next_action, cancelable, expires_at, a queue object and timestamps. When a run has not started, queue.state says why.

waiting means the run is in line for capacity and will start. runtime_unavailable means nothing is able to run it right now. The docs state position is always null: there is no place-in-line number to display, so do not build a progress bar from it.

What to do for each state (read 2026-10-05)

From the Sume Format runs docs, read 2026-10-05
Field or stateMeaningYour action
queue.state waitingQueued for capacityKeep polling with backoff
queue.state runtime_unavailableNo runtime available nowBack off by retry_after_seconds; if it lasts more than a few minutes, send a support ticket with the request_id
queue.positionAlways nullShow elapsed time instead
expires_at90-minute ceiling for the runStop waiting after it

Check it from a shell

Set RUN_ID and SUME_API_KEY. The jq filter prints the fields that matter on one line, and the loop doubles the sleep up to 60 seconds, the backoff the docs recommend.

sleep_s=2
while true; do
  out=$(curl -s -H "Authorization: Bearer $SUME_API_KEY" \
    "https://api.sume.com/v1/format-runs/$RUN_ID/status" \
    | jq -r '.data | [.status, (.queue.state // "-"), (.expires_at // "-")] | @tsv')
  echo "$out"
  case "$out" in completed*|failed*|canceled*) break;; esac
  sleep "$sleep_s"; sleep_s=$(( sleep_s * 2 > 60 ? 60 : sleep_s * 2 ))
done

Do not resubmit

A queued run is already created. Submitting again makes a second run unless you reuse the same Idempotency-Key, in which case you get the first one back with idempotency_hit true. If the run ends failed, retry with a new key: the docs say a key is released after a failed create and a failed run is a new attempt.

Sources

Related posts

More in Developers

All Developers posts

Written by Sume