What happened
A valid empty final response from openai-codex is being treated as incomplete by Hermes.
In a Telegram group, I told the bot not to reply. Instead of staying silent, Hermes retried 3 times and then sent:
⚠️ Codex response remained incomplete after 3 continuation attempts
Expected
If Codex completes with an empty final answer, Hermes should preserve that completion state instead of treating it as incomplete.
Actual
Hermes normalizes the response to finish_reason = "incomplete" and enters the continuation loop.
Repro
I reproduced this with the live Codex Responses API and the same prompt/history.
Provider result:
response.status = completed
- one
message item
message.status = completed
message.phase = final_answer
- empty final text
Hermes result:
_run_codex_stream() receives completed
_normalize_codex_response() returns finish_reason = "incomplete"
Suspected cause
In run_agent.py, _normalize_codex_response() has this branch:
elif reasoning_items_raw and not final_text:
finish_reason = "incomplete"
That appears to misclassify a completed empty final-answer turn as incomplete.
What happened
A valid empty final response from
openai-codexis being treated asincompleteby Hermes.In a Telegram group, I told the bot not to reply. Instead of staying silent, Hermes retried 3 times and then sent:
⚠️ Codex response remained incomplete after 3 continuation attemptsExpected
If Codex completes with an empty final answer, Hermes should preserve that completion state instead of treating it as incomplete.
Actual
Hermes normalizes the response to
finish_reason = "incomplete"and enters the continuation loop.Repro
I reproduced this with the live Codex Responses API and the same prompt/history.
Provider result:
response.status = completedmessageitemmessage.status = completedmessage.phase = final_answerHermes result:
_run_codex_stream()receivescompleted_normalize_codex_response()returnsfinish_reason = "incomplete"Suspected cause
In
run_agent.py,_normalize_codex_response()has this branch:That appears to misclassify a completed empty final-answer turn as incomplete.