NousResearch/hermes-agent · error · ValueError
Codex Responses input[{idx}] message item must have content
Error message
Codex Responses input[{idx}] message item must have content list. What it means
Error "Codex Responses input[{idx}] message item must have content list." thrown in NousResearch/hermes-agent.
Source
Thrown at agent/codex_responses_adapter.py:853
if item_type == "compaction":
# Replayed native server-side compaction checkpoint (gpt-5.6,
# direct OpenAI/Codex routes). Opaque, issuer-sealed; forward
# only the fields the API defines.
encrypted = item.get("encrypted_content")
if isinstance(encrypted, str) and encrypted:
normalized.append(
{"type": "compaction", "encrypted_content": encrypted}
)
continue
if item_type == "message":
role = item.get("role")
if role != "assistant":
raise ValueError(f"Codex Responses input[{idx}] message items must have role='assistant'.")
content = item.get("content")
if not isinstance(content, list):
raise ValueError(f"Codex Responses input[{idx}] message item must have content list.")
normalized_content = []
for part_idx, part in enumerate(content):
if not isinstance(part, dict):
raise ValueError(
f"Codex Responses input[{idx}] message content[{part_idx}] must be an object."
)
part_type = part.get("type")
if part_type not in {"output_text", "text"}:
raise ValueError(
f"Codex Responses input[{idx}] message content[{part_idx}] has unsupported type {part_type!r}."
)
text = part.get("text", "")
if text is None:
text = ""
if not isinstance(text, str):
text = str(text)
normalized_content.append({"type": "output_text", "text": sanitize_text(text)})
if not normalized_content:View on GitHub (pinned to c896c09c42)
Solutions
- Provide a content list on every assistant message item.
- Fix the conversion that emitted a message item without content.
When it happens
Trigger: Thrown at agent/codex_responses_adapter.py:853 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of NousResearch/hermes-agent@c896c09c42 (2026-08-14).
Data as JSON: /api/errors/b4c4a44092a8ae31.
Report an issue: GitHub.