{"record":{"id":"ad6b98a3de4e48f9","repo":"NousResearch/hermes-agent","slug":"op-read-failed-for-reference-r-err","errorCode":null,"errorMessage":"op read failed for {reference!r}: {err}","messagePattern":"op read failed for (.+?): (.+?)","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"agent/secret_sources/onepassword.py","lineNumber":301,"sourceCode":"            cmd,\n            env=_op_child_env(token_value),\n            capture_output=True,\n            text=True,\n            encoding=\"utf-8\",\n            errors=\"replace\",\n            timeout=_OP_RUN_TIMEOUT,\n        )\n    except subprocess.TimeoutExpired as exc:\n        raise RuntimeError(\n            f\"op read timed out after {_OP_RUN_TIMEOUT}s for {reference!r}\"\n        ) from exc\n    except OSError as exc:\n        raise RuntimeError(f\"failed to invoke op: {exc}\") from exc\n\n    if proc.returncode != 0:\n        err = _scrub(proc.stderr or \"\")[:200]\n        if err:\n            raise RuntimeError(f\"op read failed for {reference!r}: {err}\")\n        raise RuntimeError(\n            f\"op read exited {proc.returncode} for {reference!r}\"\n        )\n\n    # `op` appends a trailing newline; strip only that so a value with\n    # intentional internal/edge spaces survives.  But a value that is empty or\n    # whitespace-only is treated as empty: applying it would silently clobber a\n    # good .env/shell credential with effectively nothing.\n    value = (proc.stdout or \"\").rstrip(\"\\r\\n\")\n    if not value.strip():\n        raise RuntimeError(f\"op read returned an empty value for {reference!r}\")\n    return value\n\n\n# ---------------------------------------------------------------------------\n# Fetch\n# ---------------------------------------------------------------------------\n","sourceCodeStart":283,"sourceCodeEnd":319,"githubUrl":"https://github.com/NousResearch/hermes-agent/blob/c896c09c42910c584c4c7d2325b58c14713ea42c/agent/secret_sources/onepassword.py#L283-L319","documentation":"Error \"op read failed for {reference!r}: {err}\" thrown in NousResearch/hermes-agent.","triggerScenarios":"Thrown at agent/secret_sources/onepassword.py:301 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Read the op error in the message and fix it (wrong reference, locked vault, auth).","Verify the secret reference (op://vault/item/field) is correct."],"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"}