HERMES AGENT OAUTH BROKEN - "Error: 'NoneType' object is not iterable"
Codex OAuth failure across team: TypeError "'NoneType' object is not iterable"
We are seeing Codex OAuth failures across multiple team members. We are not using an OpenAI API key; this is ChatGPT/Codex OAuth.
Provider shown in logs: openai-codex
Model: gpt-5.5
Endpoint: https://chatgpt.com/backend-api/codex
Error: TypeError: 'NoneType' object is not iterable
HTTP status: None
Impact: Non-retryable error, Codex usage blocked across team.
Logs:
API call failed (attempt 1/3): TypeError
Provider: openai-codex Model: gpt-5.5
Endpoint: https://chatgpt.com/backend-api/codex
Error: 'NoneType' object is not iterable
Non-retryable error (HTTP None) — trying fallback...
Non-retryable client error (HTTP None). Aborting.
Additional context:
- Happening across my team, not isolated to one user.
- OAuth Codex is being used, not API.
- We also see context compression warnings and an OpenRouter 402 during compression, but the Codex failure is against chatgpt.com/backend-api/codex.
- Please investigate whether the Codex OAuth backend is returning null/malformed data or whether the client is not handling a missing field.
Timestamps:
[05/26/2026 20:00 EST]
Environment:
Hermes agent
32 Comments
Same to me
thought I was going crazy when Hermes started throwing this at me. Been chasing my tail trying to solve it
---
⚠️ API call failed (attempt 1/3): TypeError
🔌 Provider: openai-codex Model: gpt-5.5
🌐 Endpoint: https://chatgpt.com/backend-api/codex
📝 Error: 'NoneType' object is not iterable
⚠️ Non-retryable error (HTTP None) — trying fallback...
❌ Non-retryable error (HTTP None): 'NoneType' object is not iterable
❌ Non-retryable client error (HTTP None). Aborting.
🔌 Provider: openai-codex Model: gpt-5.5
🌐 Endpoint: https://chatgpt.com/backend-api/codex
💡 This type of error won't be fixed by retrying.
same to me.
I'm using OpenAI OAuth Codex, GPT 5.5 the same setup as you.
The error I'm seeing on Discord is as follows:
⚠️ Non-retryable error (HTTP None) — trying fallback...
❌ Non-retryable error (HTTP None): 'NoneType' object is not iterable
⚠️ 'NoneType' object is not iterable
same here; is this an OpenAI OAuth situation or is it Hermes-driven?
The codex issue is a Hermes Problem
https://github.com/NousResearch/hermes-agent/pull/32890
I just bailed on OpenClaw and configured Hermes. It worked great, for a while. The first time I attempted to use it for something tangible a few hours later, I get hit with those errors.
SSH
⚠️ API call failed (attempt 1/3): TypeError
🔌 Provider: openai-codex Model: gpt-5.5
🌐 Endpoint: https://chatgpt.com/backend-api/codex
📝 Error: 'NoneType' object is not iterable
⚠️ Non-retryable error (HTTP None) — trying fallback...
❌ Non-retryable error (HTTP None): 'NoneType' object is not iterable
❌ Non-retryable client error (HTTP None). Aborting.
🔌 Provider: openai-codex Model: gpt-5.5
🌐 Endpoint: https://chatgpt.com/backend-api/codex
💡 This type of error won't be fixed by retrying.
─ ⚕ Hermes ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Error: 'NoneType' object is not iterable
Telegram
⚠️ The model provider failed after retries. I kept raw provider details out of chat; check gateway logs for diagnostics.
⚠️ 'NoneType' object is not iterable
Discord
⚠️ Non-retryable error (HTTP None) — trying fallback...
❌ Non-retryable error (HTTP None): 'NoneType' object is not iterable
⚠️ 'NoneType' object is not iterable
Bump, same
⚠️ API call failed (attempt 1/3): TypeError
🔌 Provider: openai-codex Model: gpt-5.5
🌐 Endpoint: https://chatgpt.com/backend-api/codex
📝 Error: 'NoneType' object is not iterable
⚠️ Non-retryable error (HTTP None) — trying fallback...
❌ Non-retryable error (HTTP None): 'NoneType' object is not iterable
❌ Non-retryable client error (HTTP None). Aborting.
🔌 Provider: openai-codex Model: gpt-5.5
🌐 Endpoint: https://chatgpt.com/backend-api/codex
💡 This type of error won't be fixed by retrying.
Same with me
⚠️ API call failed (attempt 1/3): TypeError
🔌 Provider: openai-codex Model: gpt-5.5
🌐 Endpoint: https://chatgpt.com/backend-api/codex
📝 Error: 'NoneType' object is not iterable
⚠️ Non-retryable error (HTTP None) — trying fallback...
❌ Non-retryable error (HTTP None): 'NoneType' object is not iterable
❌ Non-retryable client error (HTTP None). Aborting.
🔌 Provider: openai-codex Model: gpt-5.5
🌐 Endpoint: https://chatgpt.com/backend-api/codex
💡 This type of error won't be fixed by retrying.
Same error:
⚠️ API call failed (attempt 1/3): TypeError
🔌 Provider: openai-codex Model: gpt-5.5
🌐 Endpoint: https://chatgpt.com/backend-api/codex
📝 Error: 'NoneType' object is not iterable
⚠️ Non-retryable error (HTTP None) — trying fallback...
❌ Non-retryable error (HTTP None): 'NoneType' object is not iterable
❌ Non-retryable client error (HTTP None). Aborting.
🔌 Provider: openai-codex Model: gpt-5.5
🌐 Endpoint: https://chatgpt.com/backend-api/codex
💡 This type of error won't be fixed by retrying.
Same, really frustrating. Been working on a fix since I got home.
This issue has been resolved.
https://github.com/NousResearch/hermes-agent/pull/32963
Confirmed, the update did the trick. Thanks!
updating what? I have updated the agent and re-connected codex but nothing
Same for me
API call failed (attempt 1/3): TypeError
🔌 Provider: openai-codex Model: gpt-5.5
🌐 Endpoint: https://chatgpt.com/backend-api/codex
📝 Error: 'NoneType' object is not iterable
⚠️ Non-retryable error (HTTP None) — trying fallback...
❌ Non-retryable error (HTTP None): 'NoneType' object is not iterable
❌ Non-retryable client error (HTTP None). Aborting.
🔌 Provider: openai-codex Model: gpt-5.5
🌐 Endpoint: https://chatgpt.com/backend-api/codex
💡 This type of error won't be fixed by retrying.
same
have hermes released the fixed version?
Same error
I had gemini look at the issue and it seems to have fixed it:
│ The issue is client-side in the OpenAI SDK itself, which does not defend against response.output being None
│ (which the API returns under certain rate-limit, timeout, or error conditions).
│
│ You can temporarily fix this by patching the following three files in your Python environment:
│
│ 1. openai/lib/_parsing/_responses.py (around line 61):
│ # Change:
│ for output in response.output:
│ # To:
│ for output in (response.output or []):
│
│ 2. openai/types/responses/response.py (around line 315):
│ # Change:
│ for output in self.output:
│ # To:
│ for output in (self.output or []):
│
│ 3. openai/types/responses/parsed_response.py (around line 100):
│ # Change:
│ for output in self.output:
│ # To:
│ for output in (self.output or []):
│
│
│ This prevents the SDK from crashing with a fatal TypeError when the backend returns empty output items.
│ Hopefully, the maintainers can merge a similar defensive guard in the next release!
Hermes Agent
NoneType object is not iterableHotfix ReportIssue Summary
A Hermes Agent using ChatGPT/OpenAI as its model engine was failing during normal conversation.
When a user sent a short or unclear message, for example:
The agent did not return a normal assistant reply. Instead, it exposed internal system errors back to the user, such as:
and:
This made the agent appear broken from the user's side, even though the model itself was still capable of answering.
---
Root Cause
The issue appears to be caused by a streaming response/parsing bug between Hermes Agent and the OpenAI/ChatGPT response flow.
In some cases, the model response is streamed correctly, but the final parsed response object contains:
The code then attempts to loop through
response.outputas if it were a list:Because
response.outputisNone, Python raises:In simple terms, the code is effectively trying to do this:
which is invalid.
The safer behaviour is to treat a missing output as an empty list:
---
Why a Normal Docker Update May Not Fix It
The agent may be installed using a platform-managed Docker image.
The standard Docker image may not yet have been rebuilt with the latest Hermes/OpenAI parsing fix. This means that even if a fix exists upstream, redeploying or
restarting the standard image can continue to use the unfixed code.
In other words:
There can be a delay between:
---
Why Replacing the Whole Docker Image May Not Be Ideal
A patched upstream Hermes Agent image may not behave the same as a platform-provided Docker image.
A platform-provided image may have its own:
Replacing the whole image can cause Hermes to start as a fresh installation and fail to pick up the existing configuration.
The safer fix is usually to keep the existing working image and patch only the broken OpenAI response parser inside that environment.
---
Final Fix Applied
The working platform-provided Docker image was restored first.
Then the OpenAI SDK parser inside the running container was patched.
The problematic line:
was changed to:
This prevents Hermes from crashing when
response.outputisNone.After restarting the container, the agent started responding normally again.
---
Generic Fix Instructions
1. Find the Running Hermes Container
Run:
Example:
---
2. Find the Docker Compose Folder
Run:
Set it as a variable:
Example:
---
3. Find and Back Up the Data Mount
Run:
Look for the mount that points to:
Example:
Back it up before making any changes:
Example:
---
4. Patch the OpenAI Parser Inside the Running Container
Run this from the host server:
---
5. Restart Hermes
Go to the Docker Compose folder:
Restart the service:
Or, if you know the exact service name:
Check the logs:
---
6. Test the Agent
Send a simple message through the connected channel:
Then test the original failure case:
The agent should now reply normally instead of sending:
---
Making the Fix Persistent
The patch above modifies the currently running container.
If the container is recreated from the original image, the patch may be lost.
To preserve the patched version, commit the patched container to a local Docker image:
Then update the Docker Compose YAML to use:
Then redeploy.
This keeps the existing working setup but prevents Docker from replacing the patched image with the old unfixed remote image.
---
Important Notes
Do not force-apply GitHub patches directly to a live Hermes installation unless the patch applies cleanly.
Do not replace a platform-managed Hermes image with the upstream image unless you are prepared to manually recreate:
The safest approach is:
---
Long-Term Recommendation
This should be treated as a temporary hotfix.
The correct long-term solution is for the platform-provided Hermes Docker image to be rebuilt with the official upstream fix included.
Once the official Docker image includes the fix, users should return to the official image and remove the local hotfix image.
The hermes has fixed the problem.
https://github.com/NousResearch/hermes-agent/pull/32963
Just run
uv pip install --upgrade hermes-agentto make sure your Hermes is in sync with the main branch.Worked for me LOL
Running
hermes updatesolved ithermes updatedid solved it but i still get these warning :No first byte from provider in 45s (codex stream, model: gpt-5.3-codex). Reconnecting.anyone know whats the problem?
Yes , update it"s fix
this fixed my issue
I ran into the same error.
Running
hermes updatefixed it for me as well.Docker Fix: Patch Hermes OpenAI SDK Response Parser
Use this fix when the Hermes Docker container fails because the OpenAI SDK tries to iterate over
response.outputwhen it isNone.What this patch changes
It updates the Hermes container’s OpenAI SDK parser from:
to:
This prevents a crash when
response.outputis missing orNone.---
Patch Command
Run this on the host machine where the
hermesDocker container is running:---
Expected Success Output
You should see something like:
If you see:
then the fix is already in place.
---
Verify Hermes Logs
After restarting the container, check the logs:
For live logs:
This unblocked me ! Thanks mate.
edit:
a small thing: "hermes update" didn't work for me, showed as there is nothing to update. Now updates have succeeded and stuff seems working OK.
Running
hermes updateworked for me, I had to also restart my gateway for the changes to take effect\> posts _hermes_ issue to _codex_ repo without trying to isolate where the issue is coming form
\> determines this is, in fact, a _hermes_ issue
\> everyone keeps dumping useless walls of text "fixing the issue"
\> RIP public github issues
confirmed, working.
use "hermes update" will fix all
Same issue here on the Hostinger Hermes image (ghcr.io/hostinger/hvps-hermes-agent:latest). Re-pulling the image shows it's already up to date, so the update doesn't fix it.
Root cause isn't in Hermes — it's the OpenAI SDK's parse_response() iterating over response.output when the Codex backend now returns it as null. Patching the SDK directly fixed it for me:
(Patches .../openai/lib/_parsing/_responses.py:61.) Restart the gateway afterwards. Note it's inside the container, so it has to be re-applied after any image re-pull / container recreation until the SDK is fixed upstream.