fix(codex): handle gpt-5.5 null output in stream events - #32946
Closed
kdwhpgxgrc-spec wants to merge 1 commit into
Closed
fix(codex): handle gpt-5.5 null output in stream events#32946kdwhpgxgrc-spec wants to merge 1 commit into
kdwhpgxgrc-spec wants to merge 1 commit into
Conversation
gpt-5.5 intermittently emits SSE events where response.output is JSON null. The OpenAI SDK's parse_response() iterates it directly, raising TypeError: 'NoneType' object is not iterable. Hermes misclassified TypeError as a non-retryable local bug, causing permanent session failure. - codex_runtime: catch TypeError with null-output fingerprint; retry up to max_stream_retries, then fall back to create(stream=True) - conversation_loop: guard tool_calls iteration against None (codex transport returns None, not [], when no tools called) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Collaborator
Contributor
|
Closing as duplicate — the Codex null-output fix has been merged via #32963 (cherry-picked from @carltonawong's PR #32890, the one Gille reviewed). Thanks for jumping on the outage so quickly; appreciate the help. Closes #11179. |
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.
Problem
gpt-5.5 intermittently emits SSE stream events where
response.outputis JSONnull. The OpenAI SDK'sparse_response()doesfor output in response.output— crashing withTypeError: 'NoneType' object is not iterable.Hermes classified
TypeErroras a non-retryable local programming bug, so every affected request failed permanently with no retry. Sessions usingopenai-codex/gpt-5.5became completely unresponsive.Fix
agent/codex_runtime.py— catchTypeErrorwith null-output fingerprint ('NoneType'or'is not iterable') in the stream loop. Retry up tomax_stream_retries, then fall back to_run_codex_create_stream_fallback(). Mirrors existing handling forRuntimeErrorand transport errors.agent/conversation_loop.py— guardtool_callsset-comprehension againstNone. The codex transport returnstool_calls=None(not[]) when no tools were called; iterating it raised the sameTypeErrorclass.Reproduction
Any
openai-codexsession ongpt-5.5hitting the intermittent null-output backend behavior — every message fails with⚠️ 'NoneType' object is not iterable.🤖 Generated with Claude Code