hermes - 💡(How to fix) Fix Bug: `hermes update` aborts with `ValueError: too many values to unpack (expected 2)` in `_build_web_ui`; leaves installation in half-updated state with no way to retry

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

⚕ Updating Hermes Agent...

→ Fetching updates... → Discarding working-tree changes on managed clone before update... → Found 3 new commit(s) ✓ Pre-update snapshot: 20260605-034643-pre-update → Pulling updates... ✓ Cleared 80 stale pycache directories → Updating Python dependencies... Traceback (most recent call last): File "/home/eno/.local/bin/hermes", line 10, in <module> sys.exit(main()) File "/home/eno/.hermes/hermes-agent/hermes_cli/main.py", line 16010, in main File "/home/eno/.hermes/hermes-agent/hermes_cli/main.py", line 10118, in cmd_update cmd.insert(3, "--system") File "/home/eno/.hermes/hermes-agent/hermes_cli/main.py", line 10583, in _cmd_update_impl _build_web_ui(PROJECT_ROOT / "web") ValueError: too many values to unpack (expected 2)

Root Cause

Stack trace analysis

  • _build_web_ui is declared -> bool and all its return statements return a single bool. No caller unpacks it as a tuple.
  • The actual ValueError is thrown somewhere inside _build_web_ui or one of the helpers it calls (_run_npm_install_deterministic, _run_with_idle_timeout, etc.) — but Python's traceback shows the call site (line 10583) rather than the real line, because the exception propagates through the function boundary.
  • Suggested fix: re-raise the traceback's innermost frame so the user can see which call inside _build_web_ui is the culprit.

Fix Action

Workaround

cd ~/.hermes/hermes-agent
git reset --hard <previous-good-commit>
hermes update   # will be skipped with "Already up to date"

This is what I had to do to recover. Please fix this — at minimum, _cmd_update_impl should not silently leave the worktree in a half-updated state, and the second-run case should detect the partial state and resume from where it failed (re-run Python deps install + web build) instead of reporting success.

Code Example

Updating Hermes Agent...

Fetching updates...
Discarding working-tree changes on managed clone before update...
Found 3 new commit(s)
Pre-update snapshot: 20260605-034643-pre-update
Pulling updates...
Cleared 80 stale __pycache__ directories
Updating Python dependencies...
Traceback (most recent call last):
  File "/home/eno/.local/bin/hermes", line 10, in <module>
    sys.exit(main())
  File "/home/eno/.hermes/hermes-agent/hermes_cli/main.py", line 16010, in main
  File "/home/eno/.hermes/hermes-agent/hermes_cli/main.py", line 10118, in cmd_update
    cmd.insert(3, "--system")
  File "/home/eno/.hermes/hermes-agent/hermes_cli/main.py", line 10583, in _cmd_update_impl
    _build_web_ui(PROJECT_ROOT / "web")
ValueError: too many values to unpack (expected 2)

---

hermes update

---

cd ~/.hermes/hermes-agent
git reset --hard <previous-good-commit>
hermes update   # will be skipped with "Already up to date"
RAW_BUFFERClick to expand / collapse

Bug: hermes update aborts with ValueError: too many values to unpack (expected 2) after pulling commits; update leaves installation in half-updated state

Environment

  • Hermes Agent: v0.15.1 (2026.5.29) attempting to update to 3 newer commits
  • Python: 3.11.15
  • Host: Ubuntu 24.04
  • Install mode: pyproject.toml editable install via venv

What happened

Ran hermes update. Output:

⚕ Updating Hermes Agent...

→ Fetching updates...
→ Discarding working-tree changes on managed clone before update...
→ Found 3 new commit(s)
  ✓ Pre-update snapshot: 20260605-034643-pre-update
→ Pulling updates...
  ✓ Cleared 80 stale __pycache__ directories
→ Updating Python dependencies...
Traceback (most recent call last):
  File "/home/eno/.local/bin/hermes", line 10, in <module>
    sys.exit(main())
  File "/home/eno/.hermes/hermes-agent/hermes_cli/main.py", line 16010, in main
  File "/home/eno/.hermes/hermes-agent/hermes_cli/main.py", line 10118, in cmd_update
    cmd.insert(3, "--system")
  File "/home/eno/.hermes/hermes-agent/hermes_cli/main.py", line 10583, in _cmd_update_impl
    _build_web_ui(PROJECT_ROOT / "web")
ValueError: too many values to unpack (expected 2)

Damage caused

  1. The 3 new commits were pulled to disk (working tree was not reset).
  2. Python dependency install did not run (the traceback exits before _install_python_dependencies_with_optional_fallback finishes its current step).
  3. A second hermes update now reports ✓ Already up to date! and exits 0 immediately — there is no way to re-trigger the post-pull build without manually git reset first.
  4. Net result: source code on disk is at the new commits, but the venv's installed packages are still the previous version. Running hermes from this state may ImportError if the new code uses anything not in the old venv.

Why this is bad

The user has no clean path forward:

  • Cannot retry hermes update (thinks it's up to date)
  • Must git reset --hard HEAD~3 to recover (loses any local skill/plugin additions in the worktree)
  • The error message is misleading: the ValueError originates from inside _build_web_ui (or one of its subprocesses), not from line 10583 which is just the call site.

Stack trace analysis

  • _build_web_ui is declared -> bool and all its return statements return a single bool. No caller unpacks it as a tuple.
  • The actual ValueError is thrown somewhere inside _build_web_ui or one of the helpers it calls (_run_npm_install_deterministic, _run_with_idle_timeout, etc.) — but Python's traceback shows the call site (line 10583) rather than the real line, because the exception propagates through the function boundary.
  • Suggested fix: re-raise the traceback's innermost frame so the user can see which call inside _build_web_ui is the culprit.

Reproduction

On a fresh v0.15.1 install:

hermes update

…will fail with this traceback if the host has npm installed but web/ is in a state where the build needs to run.

Workaround

cd ~/.hermes/hermes-agent
git reset --hard <previous-good-commit>
hermes update   # will be skipped with "Already up to date"

This is what I had to do to recover. Please fix this — at minimum, _cmd_update_impl should not silently leave the worktree in a half-updated state, and the second-run case should detect the partial state and resume from where it failed (re-run Python deps install + web build) instead of reporting success.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING