NousResearch/hermes-agent · error · ValueError
Codex Responses input[{idx}] function_call_output is missing
Error message
Codex Responses input[{idx}] function_call_output is missing call_id. What it means
Error "Codex Responses input[{idx}] function_call_output is missing call_id." thrown in NousResearch/hermes-agent.
Source
Thrown at agent/codex_responses_adapter.py:760
arguments = json.dumps(arguments, ensure_ascii=False)
elif not isinstance(arguments, str):
arguments = str(arguments)
arguments = sanitize_text(arguments.strip() or "{}")
normalized.append(
{
"type": "function_call",
"call_id": call_id.strip(),
"name": name.strip(),
"arguments": arguments,
}
)
continue
if item_type == "function_call_output":
call_id = item.get("call_id")
if not isinstance(call_id, str) or not call_id.strip():
raise ValueError(f"Codex Responses input[{idx}] function_call_output is missing call_id.")
output = item.get("output", "")
if output is None:
output = ""
# Output may be a string OR an array of structured content
# items (input_text / input_image) for multimodal tool results.
# Both shapes are accepted by the Responses API. We preserve
# the array form when present.
if isinstance(output, list):
# Validate each item is a recognised content shape; drop
# anything else to avoid 4xx from the API.
cleaned: List[Dict[str, Any]] = []
for part in output:
if not isinstance(part, dict):
continue
ptype = part.get("type")
if ptype == "input_text":
text = part.get("text")
if isinstance(text, str) and text:View on GitHub (pinned to c896c09c42)
Solutions
- Include call_id on every function_call_output item so it pairs with its call.
- Repair the history entry whose tool output lost its call_id.
When it happens
Trigger: Thrown at agent/codex_responses_adapter.py:760 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/c87ce0a544a651cc.
Report an issue: GitHub.