NousResearch/hermes-agent · error · RuntimeError

bws returned non-JSON output: {exc}

Error message

bws returned non-JSON output: {exc}

What it means

Error "bws returned non-JSON output: {exc}" thrown in NousResearch/hermes-agent.

Source

Thrown at agent/secret_sources/bitwarden.py:724

    if proc.returncode != 0:
        # bws writes auth/network errors to stderr as a Rust error-report
        # dump (color-eyre): an "Error:" header, indented cause lines, then
        # "Location:" / "Backtrace omitted" noise.  Strip ANSI and boil it
        # down to the meaningful cause line(s) before surfacing.
        err = _summarize_bws_stderr(proc.stderr or proc.stdout or "")
        raise RuntimeError(
            f"bws exited {proc.returncode}: {err[:200]}"
        )

    raw = proc.stdout.strip()
    if not raw:
        return {}, ["bws returned no output (empty project?)"]

    try:
        payload = json.loads(raw)
    except json.JSONDecodeError as exc:
        raise RuntimeError(f"bws returned non-JSON output: {exc}") from exc

    if not isinstance(payload, list):
        raise RuntimeError(
            f"bws returned unexpected shape: {type(payload).__name__}"
        )

    secrets: Dict[str, str] = {}
    warnings: List[str] = []
    for item in payload:
        if not isinstance(item, dict):
            continue
        key = item.get("key")
        value = item.get("value")
        if not isinstance(key, str) or not isinstance(value, str):
            continue
        if not _is_valid_env_name(key):
            warnings.append(
                f"Skipping secret {key!r}: not a valid env-var name"

View on GitHub (pinned to c896c09c42)

Solutions

  1. Upgrade or reinstall bws; its output was not valid JSON for this command.
  2. Run the bws command manually to see the raw output and diagnose.

When it happens

Trigger: Thrown at agent/secret_sources/bitwarden.py:724 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/81ecc39fd40c9fe2. Report an issue: GitHub.