Skip to content

fix: complete realtime history on audio done#3439

Open
pragnyanramtha wants to merge 1 commit into
openai:mainfrom
pragnyanramtha:pragnyan/fix-realtime-audio-done-history-status
Open

fix: complete realtime history on audio done#3439
pragnyanramtha wants to merge 1 commit into
openai:mainfrom
pragnyanramtha:pragnyan/fix-realtime-audio-done-history-status

Conversation

@pragnyanramtha
Copy link
Copy Markdown

Summary

Fixes realtime assistant history status updates after audio playback finishes. When audio_done arrives, the session now marks the matching assistant message as completed and emits a history_updated event after the existing audio_end event. This keeps history consumers from seeing completed audio responses stuck at in_progress.

Test plan

  • uv run pytest tests/realtime/test_session.py -q
  • uv run ruff format --check src/agents/realtime/session.py tests/realtime/test_session.py
  • uv run ruff check src/agents/realtime/session.py tests/realtime/test_session.py
  • git diff --check

Issue number

Fixes #1434

Checks

  • I have added new tests (if relevant)
  • I have added/updated the relevant documentation
  • I have run make lint and make format or focused Ruff equivalents
  • I have made sure tests pass

@pragnyanramtha pragnyanramtha marked this pull request as ready for review May 17, 2026 04:29
Copilot AI review requested due to automatic review settings May 17, 2026 04:29
@seratch seratch added duplicate This issue or pull request already exists feature:realtime labels May 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

duplicate This issue or pull request already exists feature:realtime

Projects

None yet

Development

Successfully merging this pull request may close these issues.

in history_updated events, the status of 'assistant' is always 'in_progress'. After the assistant has spoken or generated audio, it must say 'Completed'

2 participants