NousResearch/hermes-agent · error · RuntimeError

Codex Responses stream did not emit a terminal response

Error message

Codex Responses stream did not emit a terminal response

What it means

Error "Codex Responses stream did not emit a terminal response" thrown in NousResearch/hermes-agent.

Source

Thrown at agent/codex_runtime.py:1286

    elif collected_text_deltas and not has_tool_calls:
        assembled = "".join(collected_text_deltas)
        output = [SimpleNamespace(
            type="message",
            role="assistant",
            status="completed",
            content=[SimpleNamespace(type="output_text", text=assembled)],
        )]
    else:
        output = []

    # If the stream ended without any terminal event AND produced no usable
    # content (no items, no text deltas), surface that as a RuntimeError so
    # callers can distinguish "stream truncated mid-flight / provider rejected
    # the call" from "stream completed with empty body".  This preserves the
    # signal the SDK's high-level helper used to raise as
    # ``RuntimeError("Didn't receive a `response.completed` event.")``.
    if not saw_terminal and not output:
        raise RuntimeError(
            "Codex Responses stream did not emit a terminal response"
        )

    assembled_text = "".join(collected_text_deltas)

    final = SimpleNamespace(
        output=output,
        output_text=assembled_text,
        usage=terminal_usage,
        status=terminal_status,
        id=terminal_response_id,
        model=model,
        incomplete_details=terminal_incomplete_details,
        error=terminal_error,
    )
    return final

View on GitHub (pinned to c896c09c42)

Solutions

  1. Retry the call; the stream closed without a terminal response event.
  2. Check network/proxy stability for long-lived streams to the provider.
  3. Inspect provider logs for a dropped or errored stream.

When it happens

Trigger: Thrown at agent/codex_runtime.py:1286 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/ec1c2fb7dc972cb0. Report an issue: GitHub.