{"record":{"id":"3fb5889c4cfd78a1","repo":"NousResearch/hermes-agent","slug":"responses-api-returned-no-output-items","errorCode":null,"errorMessage":"Responses API returned no output items","messagePattern":"Responses API returned no output items","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"agent/codex_responses_adapter.py","lineNumber":1315,"sourceCode":"                \"Codex response has empty output but output_text is present (%d chars); \"\n                \"synthesizing output item.\", len(out_text.strip()),\n            )\n            output = [SimpleNamespace(\n                type=\"message\", role=\"assistant\", status=\"completed\",\n                content=[SimpleNamespace(type=\"output_text\", text=out_text.strip())],\n            )]\n            response.output = output\n        elif response_incomplete_content_filter:\n            # This is a deterministic provider safety block, not a partial\n            # answer. Synthesize an empty message so finish_reason below becomes\n            # content_filter and the conversation loop can fallback/surface it\n            # instead of burning three continuation attempts.\n            output = [SimpleNamespace(\n                type=\"message\", role=\"assistant\", status=\"completed\", content=[]\n            )]\n            response.output = output\n        else:\n            raise RuntimeError(\"Responses API returned no output items\")\n\n    if response_status in {\"failed\", \"cancelled\"}:\n        error_obj = getattr(response, \"error\", None)\n        error_msg = _format_responses_error(error_obj, response_status)\n        raise RuntimeError(error_msg)\n\n    content_parts: List[str] = []\n    reasoning_parts: List[str] = []\n    reasoning_items_raw: List[Dict[str, Any]] = []\n    message_items_raw: List[Dict[str, Any]] = []\n    tool_calls: List[Any] = []\n    has_incomplete_items = response_status in {\"queued\", \"in_progress\", \"incomplete\"}\n    saw_streaming_or_item_incomplete = response_status in {\"queued\", \"in_progress\"}\n    saw_commentary_phase = False\n    saw_final_answer_phase = False\n    saw_reasoning_item = False\n\n    # Server-side built-in tool calls (xAI's native web_search, code","sourceCodeStart":1297,"sourceCodeEnd":1333,"githubUrl":"https://github.com/NousResearch/hermes-agent/blob/c896c09c42910c584c4c7d2325b58c14713ea42c/agent/codex_responses_adapter.py#L1297-L1333","documentation":"Error \"Responses API returned no output items\" thrown in NousResearch/hermes-agent.","triggerScenarios":"Thrown at agent/codex_responses_adapter.py:1315 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Retry the request; the Responses API returned no output items.","Check the request (model, tools, input) is valid for the Responses endpoint.","Review provider logs for an upstream error that yielded an empty output."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"c896c09c42910c584c4c7d2325b58c14713ea42c","analyzedAt":"2026-08-14T17:18:01.089Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}