Bug
Hermes v0.14.0 (latest, updated 2026-05-27 with 471 commits pulled) crashes on every hermes chat call when using openai-codex provider with gpt-5.5.
Error: 'NoneType' object is not iterable
Root Cause
The ChatGPT Codex backend (chatgpt.com/backend-api/codex) returns output: null in response.completed SSE stream events. The OpenAI Python SDK's parse_response() at openai/lib/_parsing/_responses.py:61 does for output in response.output: with no null guard, crashing the stream parser before Hermes's own backfill logic (in codex_runtime.py) ever runs.
This affects all OpenAI SDK versions through 2.38.0 (latest). Filed upstream: openai/openai-python#3313
Workaround
Patch the installed SDK:
sed -i 's/for output in response.output:/for output in (response.output or []):/' \
$(python3 -c "import openai; print(openai.__file__.rsplit('/',1)[0])")/lib/_parsing/_responses.py
Note: This patch is overwritten by hermes update or pip install openai.
Suggested Fix
Either:
- Pin to a fixed SDK version once OpenAI patches it
- Add a monkey-patch in Hermes's codex transport init that guards the SDK's
parse_response
- Add the
sed patch to hermes update post-install hooks until upstream fixes
Environment
- Hermes: v0.14.0 (2026.5.16), fully updated
- OpenAI SDK: 2.24.0 (pinned), tested through 2.38.0
- Python: 3.11.15
- Config: provider=openai-codex, model=gpt-5.5, base_url=chatgpt.com/backend-api/codex
- Auth: valid OAuth token (Plus plan, 93h remaining), no residency constraint
- VPS: Hostinger
Bug
Hermes v0.14.0 (latest, updated 2026-05-27 with 471 commits pulled) crashes on every
hermes chatcall when usingopenai-codexprovider withgpt-5.5.Root Cause
The ChatGPT Codex backend (
chatgpt.com/backend-api/codex) returnsoutput: nullinresponse.completedSSE stream events. The OpenAI Python SDK'sparse_response()atopenai/lib/_parsing/_responses.py:61doesfor output in response.output:with no null guard, crashing the stream parser before Hermes's own backfill logic (incodex_runtime.py) ever runs.This affects all OpenAI SDK versions through 2.38.0 (latest). Filed upstream: openai/openai-python#3313
Workaround
Patch the installed SDK:
Note: This patch is overwritten by
hermes updateorpip install openai.Suggested Fix
Either:
parse_responsesedpatch tohermes updatepost-install hooks until upstream fixesEnvironment