← All workflows

Workflow

OpenAI Responses background mode, webhooks and polling

Build and verify the result retrieval loop for an OpenAI background request.

Sources checked:

What you can do

Deliver each terminal response once despite retries and client disconnects.

Track the response ID, verify signed events and choose a bounded polling fallback.

Build your execution checklist

Inputs are processed in this browser only and cleared when you close or refresh the page.

An OpenAI task should complete while the requestor is offline or no longer waiting.

Template preview background-acceptance.tsv

Case	Expected outcome
Duplicate webhook-id	One durable completion
Invalid signature	Rejected before enqueue
Incomplete response	Stored as incomplete
Polling timeout	Report pending and stop current poll

Read the full steps

Build a background result delivery loop

An OpenAI task should complete while the requestor is offline or no longer waiting.

  1. Save the returned response ID and user-visible job ID together. Decide which terminal states you will expose to the client.
  2. For polling, stop when no longer queued or in_progress, applying bounded backoff. For webhooks, verify the raw request signature, durably deduplicate by webhook-id and queue retrieval before returning 2xx.
  3. Test duplicate event delivery, delayed result and failed or incomplete jobs. If using temporary retention, verify retrieval happens before the data disappears.
Template preview: background-acceptance.tsv
Case	Expected outcome
Duplicate webhook-id	One durable completion
Invalid signature	Rejected before enqueue
Incomplete response	Stored as incomplete
Polling timeout	Report pending and stop current poll

Scope & limits

  • Temporary retention and webhooks vary by project and completion window.

Verified sources

Templates are authored by Kunavo. External product behavior depends on the linked sources and your account settings.