Repository navigation
Keep Hermes Desktop opening on its runtime after Hermes updates - #718
Conversation
Hermes now returns five values from _desktop_launch_options(), appending the renderer accessibility switch. The launcher unpacked exactly four, so once a user's runtime updated, every launch died with "too many values to unpack" before the app opened. The launcher now takes the first four and reads the fifth when present, so it keeps working with the packaged release and with newer runtimes, and it bridges an explicit accessibility opt-out the same way Hermes' own launcher does. The launch check now also runs a five-value helper, which fails against the previous launcher. Fixes omacom/omarchy#13491 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…er's new arity _desktop_launch_options() returns five values since Hermes grew a trailing renderer_accessibility field, so the launcher died with "too many values to unpack (expected 4)" before os.execve — and gtk-launch discards stderr, so the app icon became a silent no-op that left no process and no log line behind. The launcher also exported HERMES_DESKTOP_IGNORE_EXISTING=1 unconditionally while preferring the runtime's own app binary a few lines above it: with a runtime installed, Desktop skipped that runtime and offered first-run setup instead of the user's sessions. Ignoring an existing runtime is only correct for the bundled /opt app, which is built from the package's release commit and cannot drive a runtime built from another one. pkgrel bumped for the changed artifact.
The runtime's own app now finds its runtime the way `hermes desktop` launches it, through the installed-runtime lookup, instead of being pinned to it with HERMES_DESKTOP_HERMES_ROOT. That variable is upstream's developer override: it resolves before the lookup that Repair install bypasses, so pinning the runtime turned a hard repair into a restart against the same broken venv. HERMES_DESKTOP_IGNORE_EXISTING is set only when the launcher falls back to the packaged /opt app, and an explicit value in the environment still wins, so the in-app updater's relaunch of the runtime app no longer inherits it. The fifth launch option is read the way it was accepted in the previous commit but one, with the checksums the two earlier commits left stale brought up to date. runtime-test.py now records both variables, so it fails if the unconditional export or the root pin comes back. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Co-Authored-By: Codex XHigh <noreply@openai.com>
|
End-to-end review of 850550b, using the package CI built for it (its launcher is byte-identical to the branch), on three fresh dev-channel workers set up through Both issues are fixed on a real desktop:
One regression, now described in the body: until the runtime first updates, the runtime's app is the seeded v2026.9.7 build, which looks for a Nothing else was found. Waiting on the maintainer to merge; #705 and #708 are superseded by this once it lands. 🤖 Generated by Opus 5.5 in Claude Code. Reviewed by Codex XHigh. |
|
Independently reproduced on a machine that hit this today: Omarchy Ran the packaging check with this PR's test file against
The live incident, from the app's own and the icon was a silent no-op at the same time, traceback as in the issue. I also ran this PR's launcher bytes on the live machine (runtime checkout ahead of the package): the child environment carries no Two notes, neither blocking:
|
|
@manuaudio @angelundeveloped thank you both. You fixed this launcher from two sides: #705 accepted the fifth launch option Hermes started returning, and #708 found that the unconditional I'm closing #705 and #708 in favour of it: all three change the same lines, so only one of them could land. Thanks as well to @dadofsambonzuki for reproducing both halves independently. The optional hardening of the unpack is noted for a follow-up rather than this change, so what merged is the build that was tested. 🤖 Generated by Opus 5.5 in Claude Code. |
Once a Hermes runtime updates itself past the packaged release, the app icon stops opening Hermes Desktop. Upstream's
_desktop_launch_options()has returned five values since 2026-09-27, with renderer accessibility appended, and the launcher unpacked exactly four, so it died withValueError: too many values to unpack (expected 4)before exec. The desktop entry discards the launcher's stderr, so the click does nothing and leaves nothing in the logs. Bothhermes updateand the app's own Update now move the runtime there.The launcher also exported
HERMES_DESKTOP_IGNORE_EXISTING=1on every launch, including for the app built inside the runtime, and current Desktop reads that as "skip the installed runtime". So the runtime's own app opened on "Set up Hermes Desktop" instead of the user's Hermes. The in-app updater relaunches the app binary directly and passes the variable on, so every in-app update came back to first-run setup, and choosing Install Hermes locally rebuilt everything before the app gave up waiting for its backend.The launcher now reads the fifth value when there is one, and bridges an explicit
renderer_accessibility: falsetoHERMES_DESKTOP_RENDERER_ACCESSIBILITY=0the wayhermes desktopdoes. It tells only the packaged/optapp to skip an existing Hermes, and leaves an explicit value in the environment alone. The runtime's own app finds its runtime through the normal installed-runtime lookup, which is howhermes desktoplaunches it. Pinning it withHERMES_DESKTOP_HERMES_ROOTinstead would resolve ahead of the lookup that Repair install bypasses, turning a hard repair into a restart against the same venv.runtime-test.pynow runs a helper that returns five values and records both variables, socheck()fails if the four-value unpack, the unconditional export or a root pin comes back.One case is unchanged. When the runtime's app is missing and the launcher falls back to
/opt, the v2026.9.7 app there still adopts a usable runtime at~/.hermes/hermes-agentwhateverHERMES_DESKTOP_IGNORE_EXISTINGsays, because in that release the variable only guards thehermesfound on PATH. It does open against the runtime. Keeping the release app off a newer runtime would need a different mechanism, and this change does not attempt one.One case gets worse until the runtime first updates. Until then the runtime's app is the seeded copy of the packaged release, and that release looks for a
hermeson PATH after the installed runtime, skipping it only whenHERMES_DESKTOP_IGNORE_EXISTINGis set. Without the variable, a Repair install that escalates to a reinstall finds~/.local/bin/hermes, which is the same runtime, and restarts it instead of rerunning the installer. Upstream's ownhermes desktoplaunches that build the same way, and upstream main no longer looks on PATH, so the firsthermes updateor in-app update ends it, as will the next package release. Setting the variable for the seeded app instead would pass through the in-app updater's relaunch into the rebuilt app and bring back the setup screen this change fixes.This carries the work of @angelundeveloped in #708 and @manuaudio in #705, which fixed this launcher from two sides. Both of their commits are kept with their authorship.
Fixes omacom/omarchy#13491
Fixes omacom/omarchy#13453
Codex XHigh reviewed the change; it can read the session that wrote it, so its independence is not guaranteed. It agreed that the runtime lookup is right, and it raised both limits described above.
🤖 Generated by Opus 5.5 in Claude Code. Reviewed by Codex XHigh.