Preserve server status when converting realtime message items - #4602
Closed
mikemikimike wants to merge 2 commits into
Closed
Preserve server status when converting realtime message items#4602mikemikimike wants to merge 2 commits into
mikemikimike wants to merge 2 commits into
Conversation
mikemikimike
force-pushed
the
fix/realtime-item-status-4597
branch
from
August 23, 2026 16:48
dd130b0 to
5a3aa96
Compare
mikemikimike
force-pushed
the
fix/realtime-item-status-4597
branch
from
August 23, 2026 17:41
5a3aa96 to
46d2545
Compare
Member
|
We are keeping #4598 as the destination for #4597. The useful part here is the session-level assertion that explicit server status and an existing transcript survive reconciliation. The runtime changes in #4602 go further: they change the released missing-status fallback from in_progress to None and add an assistant-only session rule, while the reported case already carries completed. That broader omitted-status contract is not established by #4597. I am going to close #4602 in favor of the narrower #4598 path. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #4597.
The Realtime conversation item converter previously replaced the server-provided status with
in_progress. Retrieved completed or incomplete assistant items therefore regressed inRealtimeSessionhistory after reconciliation.This update:
RealtimeSessionitem-update path.Validation
uv run --frozen pytest tests/realtime/test_item_parsing.py tests/realtime/test_session.py -q— 205 passeduv run --frozen ruff format --check src/agents/realtime/session.py src/agents/realtime/openai_realtime.py tests/realtime/test_item_parsing.py tests/realtime/test_session.py— passeduv run --frozen ruff check src/agents/realtime/session.py src/agents/realtime/openai_realtime.py tests/realtime/test_item_parsing.py tests/realtime/test_session.py— passedgit diff --check— passeduv run --frozen mypy src— blocked by the local environment missingnumpyandnumpy.typingstubsAgent review
GPT-5 via Codex, one fresh review pass after the formatting fix. Verified that the converter preserves server status, the session fallback only applies when the incoming status is absent, transcript preservation remains intact, and the regression tests cover completed, incomplete, and missing-status cases. No additional findings.