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.

4 min readSume
All posts

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.

Sume errors and the retry rule (read 2026-10-03)
StatusCodeRetry
400invalid_request or bad_requestNo. Fix the request
401unauthorizedNo. Fix the key
402insufficient_creditsNo. Add funds or lower cost
404not_foundNo
409job_not_completed, job_not_cancelableNo. Read the job state instead
429rate_limitedYes, honor retry-after when present
429queue_fullNot until a job finishes or is canceled
503provider_capacity_exceededYes, 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

All Developers posts

Written by Sume