Sume run webhook outcome degraded: status OK but output is null

A Sume run webhook can say status OK and still carry output null. Branch on outcome (ok, degraded, error), not status, and dedupe on the envelope request_id.

5 min readSume
All posts

Branch on outcome. A run can complete, bill you and produce real media, then fail to project that media into your output_schema. The envelope status is then still OK, output is null, output_error gives the reason, and outcome is degraded. A handler that reads only status cannot tell ok from degraded.

Events and outcomes

Each run family sends one terminal event, and the outcome is in status and payload.status, not in the event name.

Run webhook fields (read 2026-10-05)
FieldValuesHow to use it
eventaction.run.terminal, format.run.terminal, agent.run.terminalRoute by family
statusOK or ERRORBinary, do not stop here
outcomeok, degraded, errorBranch on this
request_idEquals run_idDedupe key, stable across retries
created_atDelivery build timeOrder deliveries
def route(event: dict) -> str:
    outcome = event["outcome"]
    if outcome == "ok":
        return "ship"
    if outcome == "degraded":
        return "review artifacts: " + str(event["payload"].get("output_error"))
    return "retry or alert"


print(route({"outcome": "degraded", "payload": {"output_error": {"code": "x"}}}))

Dedupe and share one handler

Dedupe on the request_id of the envelope. The nested payload.request_id is a correlation id, and it differs between a webhook and a poll read. The webhook payload is the same receipt that GET /v1/{family}-runs/{run_id} returns in data, so one handler can serve both. Details are on the run webhooks page.

Check the docs before you ship

Sume's limits and field names change faster than blog posts do. Read the linked docs pages for the current request fields before you ship, and send a dry_run or a low spend cap on your first real call.

Sources

Related posts

More in Developers

All Developers posts

Written by Sume