NousResearch/hermes-agent · error · RuntimeError
bws timed out after {_BWS_RUN_TIMEOUT}s fetching secrets
Error message
bws timed out after {_BWS_RUN_TIMEOUT}s fetching secrets What it means
Error "bws timed out after {_BWS_RUN_TIMEOUT}s fetching secrets" thrown in NousResearch/hermes-agent.
Source
Thrown at agent/secret_sources/bitwarden.py:701
# Region / self-hosted support. bws defaults to https://vault.bitwarden.com
# (US Cloud); EU Cloud users need https://vault.bitwarden.eu, and
# self-hosted users need their own URL. When unset, fall back to whatever
# BWS_SERVER_URL the caller already had in their shell env (preserved by
# the copy above) so manual overrides keep working too.
if server_url:
env["BWS_SERVER_URL"] = server_url
try:
proc = subprocess.run( # noqa: S603 — bws path is trusted
cmd,
env=env,
capture_output=True,
text=True, encoding='utf-8', errors='replace',
timeout=_BWS_RUN_TIMEOUT,
stdin=subprocess.DEVNULL,
)
except subprocess.TimeoutExpired as exc:
raise RuntimeError(
f"bws timed out after {_BWS_RUN_TIMEOUT}s fetching secrets"
) from exc
except OSError as exc:
raise RuntimeError(f"failed to invoke bws: {exc}") from exc
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?)"]View on GitHub (pinned to c896c09c42)
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.
When it happens
Trigger: Thrown at agent/secret_sources/bitwarden.py:701 when the library encounters an invalid state.
Common situations: See trigger scenarios.
Understand the failure class
- Timeouts: ETIMEDOUT, deadlines, and hung requests — what actually expires when a request times out.
AI-assisted analysis of NousResearch/hermes-agent@c896c09c42 (2026-08-14).
Data as JSON: /api/errors/525d6ce3f43f6659.
Report an issue: GitHub.