NousResearch/hermes-agent · error · RuntimeError
Could not find {binary_name} inside downloaded archive (memb
Error message
Could not find {binary_name} inside downloaded archive (members: {zf.namelist()[:5]}...) What it means
Error "Could not find {binary_name} inside downloaded archive (members: {zf.namelist()[:5]}...)" thrown in NousResearch/hermes-agent.
Source
Thrown at agent/secret_sources/bitwarden.py:322
def _sha256_file(path: Path) -> str:
h = hashlib.sha256()
with open(path, "rb") as f:
for chunk in iter(lambda: f.read(65536), b""):
h.update(chunk)
return h.hexdigest()
def _pick_zip_member(zf: zipfile.ZipFile, binary_name: str) -> str:
"""Find the binary inside the upstream zip.
Historically the archive has been flat (``bws`` at the root) but we
tolerate a top-level directory just in case upstream changes.
"""
candidates = [n for n in zf.namelist() if n.split("/")[-1] == binary_name]
if not candidates:
raise RuntimeError(
f"Could not find {binary_name} inside downloaded archive "
f"(members: {zf.namelist()[:5]}...)"
)
# Prefer the shortest path (i.e. root over nested) for determinism.
candidates.sort(key=len)
return candidates[0]
def _safe_extract_member(
zf: zipfile.ZipFile, member: str, dest_dir: Path
) -> Path:
"""Extract a single archive member, refusing path traversal.
``ZipFile.extract`` will happily honour member names containing
``../`` or absolute paths, letting a malicious archive write outside
``dest_dir`` (a "zip-slip"). We resolve the would-be target and
confirm it stays within ``dest_dir`` before extracting.
"""View on GitHub (pinned to c896c09c42)
Solutions
- Re-download the archive; the expected binary is missing inside it.
- Verify the asset for your platform actually ships the bws binary.
When it happens
Trigger: Thrown at agent/secret_sources/bitwarden.py:322 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/5e453edb482822f3.
Report an issue: GitHub.