Wait over REST
The REST API answers at once. ReadGET /v1/jobs/{id} again after the seconds in a live job’s Retry-After header, or use webhooks instead of polling. A webhook also tells you when a job asks a question (job.needs_input) or a build pauses (job.paused); both wait on you.
Retry-After is shorter just after a job starts. A build is then read every 1 to 4 minutes, less often as it goes on, a run every few seconds, and a repair or a run that has turned into a long job every 4 minutes. Reading less often is fine.
An answer with a job that has ended carries stop, which reads “The job has ended. Stop calling GET /v1/jobs/{id}. Tell the user how it ended and its key result before your next call.” A run that failed while a repair works to confirm the result it kept carries stop once the repair ends. A run that ended on an unanswered sign-in or login question adds the same sentence as over MCP, below.
Wait over MCP
Run tools wait for you, up to 50 seconds, and return as soon as the job asks a question or ends. A client that accepts server-sent events gets keepalives, and progress notifications when it sends a progress token. If the job is still running when the wait ends, follownext instead of running the tool again.
get_job with wait_seconds waits the same way, up to 1,800 seconds for a client that accepts server-sent events and 50 otherwise. A wait can end early, such as during a release; call again.
The wait_seconds that next suggests follows the job: 30 seconds for a run and just after a build starts, then 1 to 4 minutes as a build goes on, and 4 minutes for a repair or a long run. It is never more than 240 seconds, so it fits a client whose tool calls time out after 5 minutes. A longer wait between calls is fine: a wait returns as soon as the job asks a question or ends.
Show a build’s progress
A build’sbuild.stages lists its five stages in order, and build.stage names the current one. Show the user a short text bar from the position of build.stage in that list, then build.now.label, each time the label changes:
Follow next
Every MCP answer with a live job carriesnext, the exact call to make next:
While the job asks,
next also has answer_url and expires_at. See answer questions.
An MCP answer with a job that has ended carries stop in place of next, which reads “The job has ended. Stop calling get_job. Tell the user how it ended and its key result before your next call.” A run that failed with a result it kept, such as a write that may have applied, while a repair works to confirm that result (maintenance.status repairing), carries next instead, a get_job wait that holds until the repair ends or asks a question, and stop once the repair ends. A run that ended no_response on a sign-in or login question nobody answered, with nothing changed, adds “No one answered this job’s sign-in question. Prefer not to start it again until the user can answer on answer_url; a new run asks the same question.”
Results are read once
Pomerado doesn’t keep results. A result is erased once an answer carrying it reaches you in full, whether fromGET /v1/jobs/{id}, get_job or a run tool. If your connection drops first, the next read returns it. An unread result is erased 60 minutes after the job ends, or, for a run whose repair is still confirming the result it kept, at least 60 minutes after that repair ends. result_expires_at says when. A result over 256 KiB comes as a result_file download instead, kept only 10 minutes from when the run stored it, just before the job ended: result_expires_at and the file’s expires_at both say when.
Save the result when you receive it. Afterward the job reads result null and result_status delivered or expired, and a retry with the same idempotency key returns the job without it. For a new result, run the tool again with a new key.
To check a job without using up its result, read its status only: GET /v1/jobs/{id}?include_result=false, or get_job with include_result false.
Details
Details
- With
wait_pastset to aninput_request.idyou already gave the user, aget_jobwait holds while that question is pending. - A
get_jobwait returns the job’s question to your agent ininput_request, withnextnaming theanswer_jobcall, or, for a secret or a login, asking your agent to give youanswer_url. - To answer your jobs’ questions yourself instead, set
question_deliverytoformwithPATCH /v1/account/preferences(account.update_preferencesincall_pomerado_api): as your default, or withconnectionfor the app or API key making the call, which wins over the default. An API key needsjobs:readto change it. Thennextasks your agent to give you the answer page, and a client that shows MCP forms asks you there during aget_jobwait. - A build’s
example_resultfollows the same read-once rule.