Workflow DevKit 5 fail-fast refusals: which Sume errors to retry
Workflow DevKit 5.0.1 now fails fast on dynamic start() refusals. Apply the same rule to Sume: do not retry a 400 or 402, retry 429 and 503 with the same key.

Workflow DevKit v5.0.1, dated October 1, 2026, changed dynamic start() refusals to fail fast instead of retrying. Sume has the same split. A 400 invalid_request or a 402 insufficient_credits will fail again if you resend it. A 429 or 503 can succeed later, and you should resend it with the same Idempotency-Key.
What changed in the release
The Releasebot entry says dynamic start() refusals "are now fatal, so a start() inside a step fails fast instead of retrying". A refusal is an answer, not a transient fault, so retrying wastes time and, for a paid step, can waste money.
A retry rule for Sume
Classify by status and code, not by whether the status is a 4xx or 5xx.
| Status | Code | Retry |
|---|---|---|
| 400 | invalid_request or bad_request | No. Fix the request |
| 401 | unauthorized | No. Fix the key |
| 402 | insufficient_credits | No. Add funds or lower cost |
| 404 | not_found | No |
| 409 | job_not_completed, job_not_cancelable | No. Read the job state instead |
| 429 | rate_limited | Yes, honor retry-after when present |
| 429 | queue_full | Not until a job finishes or is canceled |
| 503 | provider_capacity_exceeded | Yes, same idempotency key |
A classifier
This function returns whether a step should be retried. It reads the error code from the JSON envelope.
NO_RETRY = {"invalid_request", "bad_request", "unauthorized",
"insufficient_credits", "not_found"}
RETRY = {"rate_limited", "provider_capacity_exceeded"}
def should_retry(status: int, body: dict) -> bool:
code = (body.get("error") or {}).get("code", "")
if code in NO_RETRY:
return False
if code in RETRY:
return True
return status in (429, 503) and code != "queue_full"Keep the same idempotency key
Send an Idempotency-Key on submits. A replay with the same key returns the original job, so a retry after a timeout does not create a second paid job. Do not retry unsafe submit requests without one.
If your workflow engine retries a whole step, the key has to be created once, outside the step body, and passed in. Otherwise each attempt makes a new key and a new job.
Sources
Related posts
More in Developers
- Workflow DevKit 5: 12 MiB frames, pass Sume URLs not video
Workflow DevKit 5.0.1 splits WebSocket frames over 12 MiB by default (16 MiB at most). Pass Sume artifact URLs between steps instead of video bytes.
- Workflow DevKit replays: a stable Idempotency-Key for Sume submits
Workflow DevKit 4.8.12 fixed replay clock tracking. A replayed step must send the same Sume Idempotency-Key, so derive it from the run id, not Date.now.
- YouTube 16:9 resolutions 240p to 8K and what Timeline renders
YouTube lists eight 16:9 resolutions from 426x240 to 7680x4320. Sume Timeline renders four of them: 1080p, 720p, 480p and 360p. Why the other four fall outside.
- YouTube audio: AAC-LC, Opus or Eclipsa, and what a Sume export carries
YouTube's upload settings name AAC-LC, Opus and Eclipsa Audio at 48 kHz stereo. Read audio_codec, channels and sample rate from video inspect before you upload.
Written by Sume