Behavior
- Create the user-visible task immediately after submission.
- Save response and session identifiers from
response.created. - Append
response.output_text.deltato visible answer text. - Use tool and item events as sanitized activity status, not raw logs.
- Ignore unknown
data.typevalues instead of failing the stream.
Recovery
If the stream disconnects after response.created, poll the saved session until terminal and recover answer text from turns plus files from the latest file list.
Open standard
Tolerating unexpected event types and polling after a disconnect are behaviors the UHP Streaming chapter anticipates — clients must not assume optional events appear, and a dropped connection must not abort the task. See UHP Streaming.
Create API Key
Ready to run this against a live workspace? Keys take under a minute.

