hermes - 💡(How to fix) Fix [Bug]: Codex Responses stream aborts on terminal null output [3 pull requests]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

Hermes can abort openai-codex streams with TypeError: 'NoneType' object is not iterable after the backend closes the stream. The error is surfaced as non-retryable with HTTP None, suggesting it happens while the client processes streamed events rather than as an HTTP response.

Fix Action

Fixed

RAW_BUFFERClick to expand / collapse

Bug

Hermes can abort openai-codex streams with TypeError: 'NoneType' object is not iterable after the backend closes the stream. The error is surfaced as non-retryable with HTTP None, suggesting it happens while the client processes streamed events rather than as an HTTP response.

Environment

  • Provider: openai-codex
  • Model: gpt-5.5
  • Endpoint: https://chatgpt.com/backend-api/codex/responses
  • OpenAI Python SDK observed locally: 2.24.0

Evidence

The failed request had a normal outgoing payload and no null values. Hermes had already created a Codex stream request. The stream then closed and Hermes raised TypeError: 'NoneType' object is not iterable.

Related existing reports/PRs found during triage include #11179, #32883, #11182, #32884, #32888, #32890, and #32891. This issue records the specific openai-codex/gpt-5.5 reproduction and recovery acceptance criteria from the handoff plan.

Likely Cause

The SDK Responses stream parser iterates response.output. If the terminal streamed response has output: null, the SDK raises before Hermes can use the streamed response.output_item.done events it already collected.

Expected Behavior

Hermes should recover from collected streamed output items or fall back to its raw create-stream parser before treating the failure as non-retryable.

Proposed Fix

Catch only the exact null-output parser TypeError in the Codex streaming path, synthesize the final response from collected output items when available, otherwise retry once and then use the existing create-stream fallback.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING