You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug(agents): OpenAI WS replay drops message-level phase when block has explicit textSignature — commentary leaks on history replay #61476
After #59643 merged, replay conversion in src/agents/openai-ws-message-conversion.ts:356-398 can corrupt phase metadata on mixed messages.
Root cause
When replaying assistant history, if any text block has an explicit phase in its textSignature, then every other block without an explicit phase is forced to undefined instead of inheriting m.phase:
Once hasExplicitBlockPhase is true, untagged blocks stop inheriting the message phase. So a message with m.phase = "final_answer" plus one explicitly-tagged block and one untagged block gets replayed as two logical messages: one final_answer, one unphased.
On the return path, unphased text sets hasUnphasedAssistantText = true (:500-502), which prevents message.phase from being reconstructed (:575-579). This creates malformed/contradictory phase metadata.
Impact
Final-answer text can become partially unphased on replay, making downstream visibility/suppression logic inconsistent. This is especially problematic when the replayed context feeds a new turn where the model sees corrupted phase state.
Part of the post-#59643 adversarial review family. See #61474 for the full list. This one is especially relevant for the OpenAI Responses API replay path — mixed-phase assistant history gets corrupted during convertMessagesToInputItems, which affects subsequent model turns.
changed the title [-]bug(agents): replay splitting drops message-level phase when any block has explicit textSignature phase[/-][+]bug(agents): OpenAI WS replay drops message-level phase when block has explicit textSignature — commentary leaks on history replay[/+]on Apr 5, 2026
Activity
100yenadmin commentedon Apr 5, 2026
Part of the post-#59643 adversarial review family. See #61474 for the full list. This one is especially relevant for the OpenAI Responses API replay path — mixed-phase assistant history gets corrupted during
convertMessagesToInputItems, which affects subsequent model turns.[-]bug(agents): replay splitting drops message-level phase when any block has explicit textSignature phase[/-][+]bug(agents): OpenAI WS replay drops message-level phase when block has explicit textSignature — commentary leaks on history replay[/+]fix(agents): inherit message-level phase for untagged blocks during r…
fix(agents): inherit message-level phase for untagged blocks during r…
fix(agents): inherit message-level phase for untagged blocks during r…
fix(agents): inherit message-level phase for untagged blocks during r…
fix(agents): inherit message-level phase for untagged blocks during r…
fix(agents): inherit message-level phase for untagged blocks during r…
fix(agents): inherit message-level phase for untagged blocks during r…
fix(agents): inherit message-level phase for untagged blocks during r…