NousResearch/hermes-agent · error · RuntimeError

op read returned an empty value for {reference!r}

Error message

op read returned an empty value for {reference!r}

What it means

Error "op read returned an empty value for {reference!r}" thrown in NousResearch/hermes-agent.

Source

Thrown at agent/secret_sources/onepassword.py:312

        ) from exc
    except OSError as exc:
        raise RuntimeError(f"failed to invoke op: {exc}") from exc

    if proc.returncode != 0:
        err = _scrub(proc.stderr or "")[:200]
        if err:
            raise RuntimeError(f"op read failed for {reference!r}: {err}")
        raise RuntimeError(
            f"op read exited {proc.returncode} for {reference!r}"
        )

    # `op` appends a trailing newline; strip only that so a value with
    # intentional internal/edge spaces survives.  But a value that is empty or
    # whitespace-only is treated as empty: applying it would silently clobber a
    # good .env/shell credential with effectively nothing.
    value = (proc.stdout or "").rstrip("\r\n")
    if not value.strip():
        raise RuntimeError(f"op read returned an empty value for {reference!r}")
    return value


# ---------------------------------------------------------------------------
# Fetch
# ---------------------------------------------------------------------------


def fetch_onepassword_secrets(
    *,
    references: Dict[str, str],
    account: str = "",
    token_env: str = _DEFAULT_TOKEN_ENV,
    binary: Optional[Path] = None,
    binary_path: str = "",
    use_cache: bool = True,
    cache_ttl_seconds: float = 300,
    home_path: Optional[Path] = None,

View on GitHub (pinned to c896c09c42)

Solutions

  1. Verify the referenced 1Password field actually contains a value.
  2. Fill in the field in 1Password and retry.

When it happens

Trigger: Thrown at agent/secret_sources/onepassword.py:312 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/efa5038ecba66fd9. Report an issue: GitHub.