{"record":{"id":"e3ef4d2f86bd8545","repo":"NousResearch/hermes-agent","slug":"codex-responses-input-must-be-a-list-of-input-item","errorCode":null,"errorMessage":"Codex Responses input must be a list of input items.","messagePattern":"Codex Responses input must be a list of input items\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"agent/codex_responses_adapter.py","lineNumber":718,"sourceCode":"    # post-checkpoint tail untouched. Self-gating: histories without a\n    # checkpoint (every non-native session) return unchanged.\n    from agent.native_compaction import prune_pre_checkpoint_items\n\n    return prune_pre_checkpoint_items(items)\n\n\n# ---------------------------------------------------------------------------\n# Input preflight / validation\n# ---------------------------------------------------------------------------\n\ndef _preflight_codex_input_items(\n    raw_items: Any,\n    *,\n    is_github_responses: bool = False,\n    sanitize_harmony_tokens: bool = False,\n) -> List[Dict[str, Any]]:\n    if not isinstance(raw_items, list):\n        raise ValueError(\"Codex Responses input must be a list of input items.\")\n\n    sanitize_text = (\n        _neutralize_harmony_tokens\n        if sanitize_harmony_tokens\n        else lambda text: text\n    )\n    normalized: List[Dict[str, Any]] = []\n    seen_ids: set = set()\n    for idx, item in enumerate(raw_items):\n        if not isinstance(item, dict):\n            raise ValueError(f\"Codex Responses input[{idx}] must be an object.\")\n\n        item_type = item.get(\"type\")\n        if item_type == \"function_call\":\n            call_id = item.get(\"call_id\")\n            name = item.get(\"name\")\n            if not isinstance(call_id, str) or not call_id.strip():\n                raise ValueError(f\"Codex Responses input[{idx}] function_call is missing call_id.\")","sourceCodeStart":700,"sourceCodeEnd":736,"githubUrl":"https://github.com/NousResearch/hermes-agent/blob/c896c09c42910c584c4c7d2325b58c14713ea42c/agent/codex_responses_adapter.py#L700-L736","documentation":"Error \"Codex Responses input must be a list of input items.\" thrown in NousResearch/hermes-agent.","triggerScenarios":"Thrown at agent/codex_responses_adapter.py:718 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass a list of input items to the Codex Responses adapter.","Fix the calling code that serialized the input as a non-list value."],"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-15T17:31:12.345Z"}