NousResearch/hermes-agent · error · ValueError

Codex Responses input must be a list of input items.

Error message

Codex Responses input must be a list of input items.

What it means

Error "Codex Responses input must be a list of input items." thrown in NousResearch/hermes-agent.

Source

Thrown at agent/codex_responses_adapter.py:718

    # post-checkpoint tail untouched. Self-gating: histories without a
    # checkpoint (every non-native session) return unchanged.
    from agent.native_compaction import prune_pre_checkpoint_items

    return prune_pre_checkpoint_items(items)


# ---------------------------------------------------------------------------
# Input preflight / validation
# ---------------------------------------------------------------------------

def _preflight_codex_input_items(
    raw_items: Any,
    *,
    is_github_responses: bool = False,
    sanitize_harmony_tokens: bool = False,
) -> List[Dict[str, Any]]:
    if not isinstance(raw_items, list):
        raise ValueError("Codex Responses input must be a list of input items.")

    sanitize_text = (
        _neutralize_harmony_tokens
        if sanitize_harmony_tokens
        else lambda text: text
    )
    normalized: List[Dict[str, Any]] = []
    seen_ids: set = set()
    for idx, item in enumerate(raw_items):
        if not isinstance(item, dict):
            raise ValueError(f"Codex Responses input[{idx}] must be an object.")

        item_type = item.get("type")
        if item_type == "function_call":
            call_id = item.get("call_id")
            name = item.get("name")
            if not isinstance(call_id, str) or not call_id.strip():
                raise ValueError(f"Codex Responses input[{idx}] function_call is missing call_id.")

View on GitHub (pinned to c896c09c42)

Solutions

  1. Pass a list of input items to the Codex Responses adapter.
  2. Fix the calling code that serialized the input as a non-list value.

When it happens

Trigger: Thrown at agent/codex_responses_adapter.py:718 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/e3ef4d2f86bd8545. Report an issue: GitHub.