-
Notifications
You must be signed in to change notification settings - Fork 511
Description
Describe the bug
history_updated events don't reflect completed status after response.done
The history_updated event, which is automatically managed by the SDK, continues to show status: "in_progress" for assistant messages even after the response has been fully completed (including response.done, output_audio_buffer finished, and response.audio.done).
Debug information
- Agents SDK version:
@openai/agents-js(latest) - Runtime environment: Browser with Realtime API
Repro steps
- Start a Realtime session and have a conversation with the assistant
- Observe the following sequence in logs:
transport response.output_item.added → "status":"in_progress" transport response.output_item.done → "status":"completed" transport response.done → "status":"completed" // But then: history_updated → item still shows "status":"in_progress"
Concrete example from logs:
transport response.output_item.done ... "status":"completed" // ✅ Correctly shows completed
// Later:
history_updated [{"itemId":"item_xxxx","type":"message","role":"assistant","status":"in_progress",...}] // ❌ Still shows in_progress
Reproduction Repository
🔗 Complete working example: https://github.com/dudududukim/OpenAI_S2S/tree/main/voice-agent-webrtc
This repository contains full reproduction code demonstrating the bug. Clone the repository and follow the setup instructions to reproduce the issue.
Expected behavior
Since history_updated is automatically managed by the SDK, it should reflect the actual status of items. When response.done is fired after all audio processing is complete, the corresponding item in history_updated should show status: "completed" instead of remaining as status: "in_progress".
Request for OpenAI Team
Please update the history_updated event handling so that it properly reflects the actual completion status of items. Currently, items remain as "status": "in_progress" in history_updated even after they are fully completed (as evidenced by successful audio playback and transcript availability).
The OpenAI team should analyze and determine the appropriate trigger point(s) - whether it's response.output_item.done, output_audio_buffer completion, or other internal completion signals - to ensure history_updated accurately reflects the true item status. Since history_updated is SDK-managed, it should automatically stay synchronized with the actual completion state without requiring developers to manually track status changes.
Additional Context
- This affects all completed assistant responses - they permanently remain as
in_progressin history - The issue persists through multiple conversation turns
- Audio playback completes successfully, transcripts are available, but status never updates in history
- This creates inconsistency between the actual response state and what's reported in the history API