How many jobs_wait calls does a long video job need? 50 s slices

At the default 50 s slice a 10-minute render needs up to 12 jobs_wait calls, at the 55 s cap up to 11. Write the call budget into the agent instruction.

4 min readSume
All posts

A long video job needs as many jobs_wait calls as it has 50-second slices. On hosted Sume MCP the default timeout_seconds is 50 and the cap is 55, so a 10-minute render takes at most 12 calls at the default and at most 11 at the cap. A wait returns the moment the job is terminal, so these counts are ceilings, not predictions.

Why the slice is short

Sume documents the slice as a bound enforced by the server. A wait is one HTTP request held open with no data moving, and every edge between your client and the server closes such a request eventually. The API accepts larger values up to 600 and clamps them, and the response tells you about the clamp in wait_slice_clamped. So the answer to a long render is to wait again, never to ask for a longer wait.

The arithmetic

Take a job that runs for the given minutes. The ceiling is the ceiling of seconds divided by slice length, as the table shows. Use it to decide how many tool calls an agent loop may spend before it stops and reports.

Worst-case jobs_wait calls by job length (arithmetic on Sume docs, read 2026-10-05)
Job lengthSecondsCalls at 50 sCalls at 55 s
1 minute6022
5 minutes30066
10 minutes6001211
20 minutes12002422

Transport errors are not job failures

A 524, 522, 523 or 525 from jobs_wait is a transport failure, never a job outcome. The job keeps running and billing. Issue the wait again on the same ids, or read jobs_status once. Do not submit the paid create again, and do not report the job as blocked. The call budget and the retry rule belong in the same instruction, so the agent never confuses a closed connection with a failed render.

Batch the wait

After a fan-out, one batch call beats many single calls. jobs_wait takes job_ids with between 1 and 20 ids and an optional wait_for of all or any, with all as the default. With any, the other jobs still run and still bill, so use it only when you really want the first finished clip.

A budget you can paste

The helper below turns a job length into a call budget and a deadline you can paste into a prompt. It is plain arithmetic, so run it before you write the agent instruction.

import math

def wait_calls(job_minutes, slice_seconds=50):
    return math.ceil(job_minutes * 60 / slice_seconds)

def instruction(job_minutes):
    n = wait_calls(job_minutes)
    return ("Call jobs_wait with the same job ids up to " + str(n) +
            " times. On wait_slice_expired or a 52x error, wait again. "
            "Never create the job again. After that, read jobs_status and report.")

def main():
    for minutes in (1, 5, 10, 20):
        print(minutes, wait_calls(minutes), wait_calls(minutes, 55))
    print(instruction(10))

main()

Sources

Related posts

More in Developers

All Developers posts

Written by Sume