NousResearch/hermes-agent

Stale update-check cache shows wrong commits-behind count

Cluster 1620 · hermes cli · Bug. Data as of

5 open items. Fix merged in #34846 on 29 May 2026. Check it covers your case.

The short answer

1open issue
4open PRs
19items grouped
Known?
Yes. 19 related items grouped here, 6 issues already closed.
Fix event
A fix was merged to main in PR #34846. Check it covers your case. No release data is tracked. Fix link checked: 29 May 2026. This confirmation is old and may be out of date (a revert or reopen would not have invalidated it here); re-verify.
Tracker
The maintainers' tracker marks this partially resolved, deciding PRs #1637, #34846. That is separate from the fix event.

Nearly all members concern the update-check cache not being invalidated after an update, git pull, or version change, which can leave the banner or --version output showing an outdated "N commits behind" message. Most are proposed fixes that tie the cache to the local git HEAD or installed version; one also mentions warning on unsupported pip installs.

Open issues1

  • Issue#20728Bug: TUI banner shows stale "N commits behind" after successful `hermes update`

Open PRs4

  • PR#11329fix: invalidate update cache in _update_via_zip path (#11327)
  • PR#27844fix(update): key update-check cache by git HEAD
  • PR#40999fix: invalidate update cache using local HEAD (fixes #40944)
  • PR#41012fix(cli): invalidate update cache when source HEAD changes

Fixes on record

Merged to main. A stamp counts the issues a fix is linked to.

  • #1637 fix(cli): invalidate update-check cache after hermes update

    merged to main

    files: hermes_cli/main.py

    Show the diff
    • hermes_cli/main.py
      @@ -2124,7 +2124,17 @@ def _restore_stashed_changes(
           print("  Review `git diff` / `git status` if Hermes behaves unexpectedly.")
           return True
       
      -
      +def _invalidate_update_cache():
      +    """Delete the update-check cache so ``hermes --version`` doesn't
      +    report a stale "commits behind" count after a successful update."""
      +    try:
      +        cache_file = Path(os.getenv(
      +            "HERMES_HOME", Path.home() / ".hermes"
      +        )) / ".update_check"
      +        if cache_file.exists():
      +            cache_file.unlink()
      +    except Exception:
      +        pass
       
       def cmd_update(args):
           """Update Hermes Agent to the latest version."""
      @@ -2197,6 +2207,7 @@ def cmd_update(args):
               commit_count = int(result.stdout.strip())
               
               if commit_count == 0:
      +            _invalidate_update_cache()
                   print("✓ Already up to date!")
                   return
               
      @@ -2217,6 +2228,8 @@ def cmd_update(args):
                           prompt_user=prompt_for_restore,
                       )
               
      +        _invalidate_update_cache()
      +        
               # Reinstall Python dependencies (prefer uv for speed, fall back to pip)
               print("→ Updating Python dependencies...")
               uv_bin = shutil.which("uv")
  • #34846 feat(cli): warn on unsupported pip installs + fix stale update-check cache (#34491)

    merged to main

    files: hermes_cli/banner.py, tests/hermes_cli/test_pip_install_detection.py, tests/hermes_cli/test_update_check.py, website/docs/user-guide/features/code-execution.md

6 PRs closed without merging

From the close comments: superseded by another PR 2 · closed without comment 1 · duplicate 1 · won't fix / by design 1 · other 1

  • #11451 Fix stale update cache after successful updates · other
  • #20792 fix(banner): bind update-check cache to local HEAD so banner refreshes after hermes update (#20728) · superseded by another PR → #20653
  • #21447 fix: invalidate stale update-check cache · duplicate → #18236, #9670, #5359, #11327, #21675
  • #34501 fix(cli): invalidate update-check cache when installed version changes · superseded by another PR → 689ef5e, #34846, #34491
  • #40985 fix(banner): invalidate update-check cache when local git HEAD moves · closed without comment
Show 1 more
  • #41043 fix(cli): bust update-check cache when local HEAD moves · won't fix / by design
Closed issues · 6
  • Closed#1620[Bug]: `hermes --version` shows "26 commits behind" when already on latest
  • Closed#11007Stale update cache: banner shows 'N commits behind' after updating
  • Closed#11327Banner shows stale 'commits behind' after successful update — .update_check cache not invalidated
  • Closed#27841Update check cache can report stale commits-behind after git pull
  • Closed#34491check_for_updates() cache not invalidated after pip upgrade, showing stale "1 commit behind"
  • Closed#40944Banner shows stale "commits behind" count after manual git pull in source installs
How this cluster was grouped
  • Link evidence (partly structural links): some members are connected by structural evidence (shared changed files, or a closing/superseded reference); the rest are joined by an automated relevance judgement over their text.
  • Members outside that structural core may belong to a different underlying problem.
  • Pairwise link density 0.10: the share of item pairs that carry a link, counting a structural link in full and a relevance-only link at 0.36. 1.00 means every pair is linked.

For your agent

The same facts, typed.