{"record":{"id":"1f02a5b5e7dfed41","repo":"NousResearch/hermes-agent","slug":"bws-returned-unexpected-shape-type-payload-na","errorCode":null,"errorMessage":"bws returned unexpected shape: {type(payload).__name__}","messagePattern":"bws returned unexpected shape: (.+?)","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"agent/secret_sources/bitwarden.py","lineNumber":727,"sourceCode":"        # dump (color-eyre): an \"Error:\" header, indented cause lines, then\n        # \"Location:\" / \"Backtrace omitted\" noise.  Strip ANSI and boil it\n        # down to the meaningful cause line(s) before surfacing.\n        err = _summarize_bws_stderr(proc.stderr or proc.stdout or \"\")\n        raise RuntimeError(\n            f\"bws exited {proc.returncode}: {err[:200]}\"\n        )\n\n    raw = proc.stdout.strip()\n    if not raw:\n        return {}, [\"bws returned no output (empty project?)\"]\n\n    try:\n        payload = json.loads(raw)\n    except json.JSONDecodeError as exc:\n        raise RuntimeError(f\"bws returned non-JSON output: {exc}\") from exc\n\n    if not isinstance(payload, list):\n        raise RuntimeError(\n            f\"bws returned unexpected shape: {type(payload).__name__}\"\n        )\n\n    secrets: Dict[str, str] = {}\n    warnings: List[str] = []\n    for item in payload:\n        if not isinstance(item, dict):\n            continue\n        key = item.get(\"key\")\n        value = item.get(\"value\")\n        if not isinstance(key, str) or not isinstance(value, str):\n            continue\n        if not _is_valid_env_name(key):\n            warnings.append(\n                f\"Skipping secret {key!r}: not a valid env-var name\"\n            )\n            continue\n        secrets[key] = value","sourceCodeStart":709,"sourceCodeEnd":745,"githubUrl":"https://github.com/NousResearch/hermes-agent/blob/c896c09c42910c584c4c7d2325b58c14713ea42c/agent/secret_sources/bitwarden.py#L709-L745","documentation":"Error \"bws returned unexpected shape: {type(payload).__name__}\" thrown in NousResearch/hermes-agent.","triggerScenarios":"Thrown at agent/secret_sources/bitwarden.py:727 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the bws version matches what Hermes expects; the response shape was unexpected.","Run the bws command manually and compare its JSON structure."],"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-15T22:17:37.221Z"}