Repository navigation
Closed
Labels
P2Medium — degraded but workaround existsMedium — degraded but workaround existsarea/install-updateInstaller, updater, packaging, wheels, doctorInstaller, updater, packaging, wheels, doctorcomp/cliCLI entry point, hermes_cli/, setup wizardCLI entry point, hermes_cli/, setup wizardcomp/desktopElectron desktop app (apps/desktop/*)Electron desktop app (apps/desktop/*)sweeper:risk-compatibilitySweeper risk: may break existing users, config, migrations, defaults, or upgradesSweeper risk: may break existing users, config, migrations, defaults, or upgradestype/bugSomething isn't workingSomething isn't working
Description
Bug: hermes update reports success when desktop rebuild silently fails
Summary
hermes update runs hermes desktop --build-only to rebuild the packaged Electron app, but if that rebuild exits non-zero the failure is printed as a warning and the update flow continues to ✓ Code updated! → ✓ Update complete! — leaving the user with a stale desktop binary and no error to act on.
Steps to reproduce
- Install Hermes Desktop 0.15.1 on Windows
- Cause
hermes desktop --build-onlyto fail (e.g.npmnot on PATH, or the Electron binary download is blocked by a CDN — common in mainland China) - Run
hermes update - Observe the output: "⚠ Desktop build failed (non-fatal; run
hermes desktopto retry)" followed by "✓ Code updated!" and "✓ Update complete!" - Restart the desktop app — it crashes on launch with
Invalid file descriptor to ICU data receivedbecauseicudtl.datand friends are missing fromrelease/win-unpacked/.
Actual vs expected
- Actual: update exits 0, prints "Update complete!", user thinks everything is fine.
- Expected: update exits non-zero (or, at minimum, prints a hard failure banner and stays in the broken state rather than pretending success).
Root cause
hermes_cli/main.py lines 8629-8639 (commit afe53708e):
print("→ Checking if desktop app needs rebuilding...")
_desktop_build_cmd = [sys.executable, "-m", "hermes_cli.main", "desktop", "--build-only"]
build_result = subprocess.run(_desktop_build_cmd, cwd=PROJECT_ROOT, check=False)
if build_result.returncode != 0:
build_result = subprocess.run(_desktop_build_cmd, cwd=PROJECT_ROOT, check=False)
if build_result.returncode != 0:
print(" ⚠ Desktop build failed (non-fatal; run `hermes desktop` to retry)")
# ... continues to "✓ Code updated!" regardless ...The retry-once helps transient races but the final if only prints a warning and falls through. The exit code of the parent hermes update process is 0, and the user-facing message is "Update complete!".
Impact
- Users in network-restricted environments (mainland China, corporate firewalls) routinely hit CDN failures when downloading the Electron 138 MB binary.
- They see "Update complete!", restart their desktop app, and it crashes — with no breadcrumb back to the actual cause beyond digging into
~/.hermes/logs/bootstrap-installer.log. - This is the same pattern that PR fix(desktop): detect stale builds and surface rebuildNeeded in update UI #42382 (stale-build detection) and PR fix(desktop): use managed Node path during updater rebuild #44476 (managed Node path) work around, but neither addresses the upstream update flow's failure-suppression.
Suggested fix
- Minimum: when
hermes desktop --build-onlyexits non-zero, exit the wholehermes updatewith a non-zero code, so the in-app update button surfaces a real "Update didn't finish" error instead of "Update complete!". - Better: detect that the packaged executable is now older than the freshly-pulled source (compare
release/win-unpacked/Hermes.exemtime togit HEAD's commit-time) and emit a hard-fail banner even if the rebuild-child itself somehow exited 0.
Environment
- Hermes Desktop 0.15.1, Windows 10
afe53708e(main)~/.hermes/logs/bootstrap-installer.logandupdate.logreproduced
Metadata
Metadata
Assignees
Labels
P2Medium — degraded but workaround existsMedium — degraded but workaround existsarea/install-updateInstaller, updater, packaging, wheels, doctorInstaller, updater, packaging, wheels, doctorcomp/cliCLI entry point, hermes_cli/, setup wizardCLI entry point, hermes_cli/, setup wizardcomp/desktopElectron desktop app (apps/desktop/*)Electron desktop app (apps/desktop/*)sweeper:risk-compatibilitySweeper risk: may break existing users, config, migrations, defaults, or upgradesSweeper risk: may break existing users, config, migrations, defaults, or upgradestype/bugSomething isn't workingSomething isn't working
Activity
AIalliAI commentedon Jun 12, 2026
Verified on current main (9102d4a) — the report is accurate, with two small corrections.
Confirmed:
hermes_cli/main.py:8635-8639:hermes desktop --build-onlyfailure (after one retry) only prints⚠ Desktop build failed (non-fatal; ...)and falls through to✓ Code updated!(line 8642) and✓ Update complete!(line 8885).cmd_updatepropagates no status, so the process exits 0.main.py:5322sys.exit(build_result.returncode or 1), plus artifact-existence checks at 5343/5348), so the parent's warning-only handling is the exact suppression point.--gatewaymode the updater unconditionally writes"0"to~/.hermes/.update_exit_code(main.py:8946-8951) after the rebuild step, so the desktop in-app update button also reports plain success.Two corrections:
shutil.which("npm")atmain.py:8628, so with npm missing it's skipped silently — no warning at all, straight to "Update complete!". Same outcome (stale binary, exit 0), but the quoted warning never prints.icudtl.datmissing) requires the failed pack to have half-destroyed the previouswin-unpackedtree — that destruction is hermes update destroys Hermes Desktop executable on failed Electron rebuild (desktop shortcut becomes dead link) #44225, a sibling bug. If the pack fails before touchingrelease/, you get a stale-but-working binary instead. This issue is the reporting gap; hermes update destroys Hermes Desktop executable on failed Electron rebuild (desktop shortcut becomes dead link) #44225 is the destruction gap.Also worth noting: the build path already auto-retries via npmmirror.com when the GitHub Electron download looks blocked (
main.py:5297-5313), so a persistent CDN failure has to defeat both hosts — but when it does, the suppression here is exactly as described.Context on why it's non-fatal: the comment at
main.py:8608-8612deliberately treats post-venv steps as "non-core". That's reasonable for the exit-the-update-early question, but it shouldn't erase the failure from the final summary and the.update_exit_codemarker. A minimal fix that keeps the non-fatal design: track adesktop_build_failedflag, print⚠ Update complete — with warnings: desktop rebuild FAILED (binary is stale; run \hermes desktop`)instead of the plain success line, and write a non-zero/warning status to.update_exit_code` so the in-app button can surface it. The mtime-vs-commit staleness detection suggested under "Better" is what PR #42382 already implements — probably best kept there.Related: #38161 is the same "update reports success despite a broken non-core step" pattern for npm deps.
szzhoujiarui-sketch commentedon Jun 12, 2026
Taking this one. Plan:
desktop_build_failedflag, print⚠ Update complete — with warnings: desktop rebuild FAILED (binary is stale; run \hermes desktop`)instead of plain✓ Update complete!, and write a non-zero/warning status to.update_exit_code` so the in-app update button can surface it.Will submit a PR shortly.
fix(update): report desktop build failure in final summary and exit code
liuhao1024 commentedon Jun 12, 2026
This is fixed by #44591 — propagates desktop build failure to hermes update exit code.
szzhoujiarui-sketch commentedon Jun 13, 2026
Confirmed: #44591 is still open and addresses this issue correctly. I'll step back and let that PR proceed — no need for a separate fix from my side. Thanks @liuhao1024 for picking this up!
Hugh-24041820 commentedon Jun 15, 2026
I'm experiencing what appears to be the same root cause on Windows 11.
Environment
Symptoms
Every time I launch the Hermes desktop app, it immediately triggers:
[bootstrap] handed off bootstrap-needed recovery to updater:
hermes-setup.exe --update --branch main
[updates] exiting desktop to release app.asar
The setup.exe runs (I see the installer window), exits with code 0, but on the next launch the same bootstrap recovery triggers again — infinite loop.
Evidence
.update_checkshows{"behind": 0, "ver": "0.16.0"}— no actual update needed.update_exit_codeshows0— setup exits "successfully" but doesn't fix the conditiondesktop.logshows the same [bootstrap] → [updater] → exit pattern repeating across every launchLikely cause
I'm in mainland China, so the Electron binary download from GitHub's CDN during the desktop rebuild phase likely fails silently (as noted in the issue description about "common in mainland China"). The update reports success but the desktop is never actually rebuilt, so Hermes keeps detecting the inconsistency.
This also causes the session context bar to reset to 0/1.0M 0% on every launch, since the desktop process is killed and recreated.
alt-glitch commentedon Jun 26, 2026
Kept open: the cited "fixed by #44591" PR is still open/unmerged, so the silent-success-on-failure bug is not yet on
main(verified verbatim athermes_cli/main.py:8635-8639onmain@9102d4a). Competing open fixes for a maintainer to pick: #44591 (propagate desktop build failure to thehermes updateexit code) and #50267 (report the failure in the final summary + exit code; re-file of closed #44608). Both target this issue.alt-glitch commentedon Jul 19, 2026
Related to open #44591, which propagates the confirmed Desktop rebuild failure into
hermes update's final result and exit code.GottZ commentedon Jul 29, 2026
Summary
One open PR addresses #44580: #44591 propagates nonzero desktop rebuild results into the final update message, gateway status file, and process exit code, but it does not detect the installed-desktop/no-resolvable-npm path that also causes silent success.
Related pull requests
best fix— (+118/-3) — partial fix: Tracks a faileddesktop --build-onlysubprocess after its retry, replaces the false final success message, writes gateway exit code1, exits nonzero, and adds regression tests. Consistent with the keep_open review on fix(cli): propagate desktop build failure to hermes update exit code #44591, it still needs a narrow rebase onto the currentfind_node_executable()/_run_logged_subprocess()implementation and coverage of the installed-desktop case where npm cannot be resolved, because the current diff skips that rebuild without setting the failure flag.Suggested consolidation
Merge #44591 after rebasing its status propagation onto the current rebuild block, preserving the captured build-log tail, and treating an installed desktop with no resolvable npm as a rebuild failure with regression coverage. There are no listed duplicate PRs to close.
Complex graph
flowchart LR classDef open fill:#dbeafe,stroke:#1d4ed8,color:#1e3a8a classDef merged fill:#dcfce7,stroke:#15803d,color:#14532d classDef closed fill:#e5e7eb,stroke:#6b7280,color:#1f2937 classDef unverified fill:#f3f4f6,stroke:#9ca3af,color:#374151 classDef best stroke-width:3px,stroke:#b45309 classDef target stroke-width:3px,stroke:#4338ca I44580(["issue #44580 (open)"]) P44591["PR #44591 (open)"] P44591 -->|best fix| I44580 class I44580 open class I44580 target class P44591 open class P44591 best click I44580 "https://github.com/NousResearch/hermes-agent/issues/44580" click P44591 "https://github.com/NousResearch/hermes-agent/pull/44591"Graph: solid arrow = fixes / best fix, dashed arrow = partial or unverified (see edge label); boxed group = PRs duplicating each other; amber border = best fix; indigo border = target; gray node = closed or no verify verdict yet (state tag in the node label).
Cross-PR triage: Reviewed 1 pull request and 1 issue in this complex. Each diff was read against this issue; Assessment working set: 9 kB of PR diffs, 6 kB of issue/PR text, 6 kB of discussion (6 comments), 2 verify verdicts. verdicts reflect diff content, not PR titles. Part of an automated triage batch.
mr-NFA commentedon Aug 5, 2026
Fresh reproduction — Aug 5 2026, Hermes v0.20.0 (2026.8.3), Windows 11 Home 26200
Real-world case from today. Same failure family as #44580 and #64567; this occurrence shows two additional gaps:
1. Update failures are silent and leave a broken desktop state.
Four
hermes updateattempts today (11:49, 12:00, 12:11, 12:21). The 11:49 run aborted on the venv-lock check (threehermes\scripts\cmdrelay processes holding the venv — the common retry scenario: users retry until it "goes through", and each retry can leave a different partial state). The 12:00 run pulled the new code but then failed, fromupdate.log:The failure is only a terminal line — nothing persistent tells the user or the desktop app that the install is now in a half-updated state.
2. Stale/absence detection did not trigger even though the packaged app was fully gone.
After the failed updates, the desktop app was completely absent: no
apps/desktop/release/win-unpacked/Hermes.exe, norelease/dir at all, nodist/, nonode_modules/underapps/desktop. Every shortcut dead, zero user-facing error. The last successful desktop build inupdate.logwas 2026-07-26; itsinstall-stamp.jsonreferenced commita97b6ff8, while current HEAD is1be70d635(newer) — exactly the "packaged exe older than pulled source" condition from the suggested fix in this issue, and nothing surfaced it. Manualhermes desktop --build-onlyrebuilt cleanly in ~10 min, confirming source and toolchain were fine.3. Possible rollback-path involvement.
The Jul 26 build log shows:
Neither
win-unpackednorwin-unpacked.bakexisted after the failed updates. Worth checking whether the rollback/cleanup path can remove both the good build and its backup.Suggested hardening (on top of #44591):
release/win-unpacked/Hermes.exemissing entirely must count as "needs rebuild", and rebuild failure should hard-fail the update (per fix(cli): propagate desktop build failure to hermes update exit code #44591).Environment: Hermes Agent v0.20.0 (2026.8.3), Python 3.11.15, Windows 11 Home Single Language build 26200, install at
C:\Users\leigh\AppData\Local\hermes\hermes-agent. Recovery washermes desktop --build-only(run detached), which rebuiltrelease/win-unpacked/Hermes.exesuccessfully.Impact note: a user without a technical assistant is simply stuck — broken shortcut, no error message, and the fix requires knowing the
hermes desktopincantation.OutThisLife commentedon Sep 24, 2026
Verified on current
main(d350422b15): a failed Desktop rebuild no longer ends in✓ Update complete!.6907c97847first replaced that banner with an "Update partially complete" warning; since the PM refactor (26c4e8b160) the update builds the desktop app inbuild_update_products()(hermes_cli/source_build.py) throughrun_contained, which raises on a non-zero exit, so a failed rebuild aborts the update instead of reporting success.