Sume primary_output_missing: schema satisfied, run still failed

A Sume run can match your output_schema and still end failed with primary_output_missing. It means the key named in primary_output_key had no value.

4 min readSume
All posts

primary_output_missing means the run's output matched your schema, but the key you named in primary_output_key had no value. The run is marked failed because the thing you said was the deliverable is not in output; output still carries the partial result.

This is documented on Sume's Structured output page under output_error.code, with details.primary_output_key telling you which key was empty. Below: why the code exists, what the receipt looks like, and how to retry.

Why would a valid schema produce a failed run?

To receive a partial result at all, your schema has to allow one: optional fields become nullable unions, and arrays you want partially filled should not set minItems. That loosening is the point of the page's "Make a partial result legal" section, and it has a side effect: a run that fills scenes but leaves full_video null satisfies the schema.

Pairing the loosened schema with primary_output_key: "full_video" is what keeps it honest. The page says the looseness buys you visibility into the partial, not a pass: the run ends failed with primary_output_missing.

What does the failed receipt contain?

The fields to read, as the docs describe them:

Receipt behaviour from the Sume Structured output docs page, read 2026-10-02.
FieldOn `primary_output_missing`
statusfailed
outputStill carries the partial result
output_error.detailsprimary_output_key
primary_output_key, primary_output_urlnull on every non-completed run
artifacts[]Populated with everything the run made

How do I branch on it?

Test primary_output_url for "does the deliverable exist"; the page says it stays null on any non-completed status, so a partial cannot fool it. Then read output for what did get made. With the ledger schema from the docs, check each scenes[].status to see which slots to retry.

To retry only what failed, send the failed run's id as previous_run_id on a new run; the docs describe this as picking up the same conversation with those clips already on it. The code list is open-ended, so fall through on codes you do not handle.

What should I change in my schema?

Keep the primary key nullable in the schema, as the docs example does for full_video, and always name it in primary_output_key. Do not remove the key from required: every property must be listed there.

Sources

Related posts

More in Formats

All Formats posts

Written by Sume