{"record":{"id":"525d6ce3f43f6659","repo":"NousResearch/hermes-agent","slug":"bws-timed-out-after-bws-run-timeout-s-fetching-s","errorCode":null,"errorMessage":"bws timed out after {_BWS_RUN_TIMEOUT}s fetching secrets","messagePattern":"bws timed out after (.+?)s fetching secrets","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"agent/secret_sources/bitwarden.py","lineNumber":701,"sourceCode":"    # Region / self-hosted support.  bws defaults to https://vault.bitwarden.com\n    # (US Cloud); EU Cloud users need https://vault.bitwarden.eu, and\n    # self-hosted users need their own URL.  When unset, fall back to whatever\n    # BWS_SERVER_URL the caller already had in their shell env (preserved by\n    # the copy above) so manual overrides keep working too.\n    if server_url:\n        env[\"BWS_SERVER_URL\"] = server_url\n\n    try:\n        proc = subprocess.run(  # noqa: S603 — bws path is trusted\n            cmd,\n            env=env,\n            capture_output=True,\n            text=True, encoding='utf-8', errors='replace',\n            timeout=_BWS_RUN_TIMEOUT,\n            stdin=subprocess.DEVNULL,\n        )\n    except subprocess.TimeoutExpired as exc:\n        raise RuntimeError(\n            f\"bws timed out after {_BWS_RUN_TIMEOUT}s fetching secrets\"\n        ) from exc\n    except OSError as exc:\n        raise RuntimeError(f\"failed to invoke bws: {exc}\") from exc\n\n    if proc.returncode != 0:\n        # bws writes auth/network errors to stderr as a Rust error-report\n        # 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?)\"]","sourceCodeStart":683,"sourceCodeEnd":719,"githubUrl":"https://github.com/NousResearch/hermes-agent/blob/c896c09c42910c584c4c7d2325b58c14713ea42c/agent/secret_sources/bitwarden.py#L683-L719","documentation":"Error \"bws timed out after {_BWS_RUN_TIMEOUT}s fetching secrets\" thrown in NousResearch/hermes-agent.","triggerScenarios":"Thrown at agent/secret_sources/bitwarden.py:701 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Retry; the bws CLI timed out fetching secrets (network or Bitwarden service slowness).","Reduce the number of secrets fetched per call.","Check connectivity to Bitwarden from this host."],"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"}