hermes - 💡(How to fix) Fix Hermes Desktop install fails: stale stash reference in bundled install script [3 comments, 2 participants]

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…
GitHub stats
NousResearch/hermes-agent#20241Fetched 2026-05-06 06:37:59
View on GitHub
Comments
3
Participants
2
Timeline
9
Reactions
0
Author
Participants
Timeline (top)
labeled ×4commented ×3closed ×1cross-referenced ×1

Error Message

→ Existing installation found, updating...
→ Local changes detected, stashing before update...
Saved working directory and index state On main: hermes-install-autostash-20260505-132632
Already on 'main'
Your branch is up to date with 'origin/main'.
→ Restoring local changes...
error: '203dfdaed23b8ace5fc45f4ea6501f5d31d944a7' is not a stash reference

Root Cause

The bundled install script calls git stash and saves a stash reference using the current HEAD SHA, but:

  1. After failed install attempts, stashes accumulate and old SHA references become stale
  2. The script tries to git stash pop using a stale SHA that no longer exists in the stash list
  3. The bundled version of install.sh in the .exe is older than the current main branch version

Code Example

Existing installation found, updating...
Local changes detected, stashing before update...
Saved working directory and index state On main: hermes-install-autostash-20260505-132632
Already on 'main'
Your branch is up to date with 'origin/main'.
 Restoring local changes...
error: '203dfdaed23b8ace5fc45f4ea6501f5d31d944a7' is not a stash reference
RAW_BUFFERClick to expand / collapse

Bug Description

Hermes Desktop bundles a copy of the install script that fails when the WSL .hermes/hermes-agent directory has a pre-existing installation with local changes and stash entries.

Steps to Reproduce

  1. Have a pre-existing Hermes Agent WSL installation at ~/.hermes/hermes-agent with local modifications
  2. Install Hermes Desktop on Windows
  3. Launch Hermes Desktop — it attempts to update the WSL Hermes installation
  4. Actual: Fails with error: '<SHA>' is not a stash reference

Root Cause

The bundled install script calls git stash and saves a stash reference using the current HEAD SHA, but:

  1. After failed install attempts, stashes accumulate and old SHA references become stale
  2. The script tries to git stash pop using a stale SHA that no longer exists in the stash list
  3. The bundled version of install.sh in the .exe is older than the current main branch version

Log Output

→ Existing installation found, updating...
→ Local changes detected, stashing before update...
Saved working directory and index state On main: hermes-install-autostash-20260505-132632
Already on 'main'
Your branch is up to date with 'origin/main'.
→ Restoring local changes...
error: '203dfdaed23b8ace5fc45f4ea6501f5d31d944a7' is not a stash reference

Environment

  • Hermes Desktop version: 0.3.4
  • Hermes CLI version: v0.12.0 (2026.4.30)
  • WSL Distro: Debian
  • Python: 3.11.15

Suggested Fix

  1. Use git stash list to enumerate valid stash refs before git stash pop, or
  2. Drop all stashes with git stash clear before creating a new one, or
  3. Add error handling around git stash pop with a fallback that manually git checkout local changes

extent analysis

TL;DR

Update the bundled install.sh script in Hermes Desktop to handle stale stash references by using git stash list or clearing existing stashes before creating a new one.

Guidance

  • Verify the issue by checking the log output for errors indicating a stale stash reference, such as '203dfdaed23b8ace5fc45f4ea6501f5d31d944a7' is not a stash reference.
  • Consider updating the install.sh script to use git stash list to enumerate valid stash refs before attempting to git stash pop.
  • As a temporary workaround, manually clear existing stashes with git stash clear before running the Hermes Desktop installation.
  • Review the suggested fixes provided in the issue, such as adding error handling around git stash pop with a fallback to git checkout local changes.

Example

# Before git stash pop, list valid stash refs
git stash list

# Alternatively, clear existing stashes before creating a new one
git stash clear

Notes

The provided suggestions assume that the issue is indeed caused by stale stash references. If the issue persists after applying these fixes, further investigation may be necessary.

Recommendation

Apply workaround: Update the install.sh script to handle stale stash references, as this is a more targeted solution than upgrading to a potentially non-existent fixed version.

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