You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
check_for_updates() cache not invalidated after pip upgrade, showing stale "1 commit behind" #34491
After upgrading hermes-agent from 0.14.0 to 0.15.1 via uv pip install --upgrade, hermes --version still shows "1
commit behind" for up to 6 hours.
Root Cause
check_for_updates() in hermes_cli/banner.py caches the result in ~/.hermes/.update_check. The cache invalidation
logic has two conditions:
if (
now-cached.get("ts", 0) <_UPDATE_CHECK_CACHE_SECONDSandcached.get("rev") ==embedded_rev
):
returncached.get("behind")
For pip-installed Hermes (non-Nix), embedded_rev is always None. After an upgrade, both the old and new cache's rev are None → cache is considered valid → stale "1 commit behind" persists until the 6-hour TTL expires.
Steps to Reproduce
Install hermes-agent==0.14.0, run hermes --version (writes cache with behind: 1)
uv pip install --upgrade hermes-agent to 0.15.1
Run hermes --version → still shows "1 commit behind"
rm ~/.hermes/.update_check, run again → correctly shows "Up to date"
Expected Behavior
Cache should be invalidated when the installed version changes. The simplest fix: add "version": VERSION to the cache
payload and compare it on read.
try:
if cache_file.exists():
cached = json.loads(cache_file.read_text())
if (
now - cached.get("ts", 0) < _UPDATE_CHECK_CACHE_SECONDS
and cached.get("rev") == embedded_rev
+ and cached.get("version") == VERSION
):
return cached.get("behind")
...
cache_file.write_text(json.dumps({
"ts": now, "behind": behind, "rev": embedded_rev,
+ "version": VERSION
}))
Environment
Hermes Agent v0.15.1 (pip install, no local git checkout)
Duplicate of #11327 — same .update_check cache invalidation gap, different update path (pip upgrade vs git pull/zip). Also related to #21675, #21526, #11007.
Activity
alt-glitch commentedon May 29, 2026
Duplicate of #11327 — same
.update_checkcache invalidation gap, different update path (pip upgrade vs git pull/zip). Also related to #21675, #21526, #11007.feat(cli): warn on unsupported pip installs + fix stale update-check …
feat(cli): warn on unsupported pip installs + fix stale update-check …
feat(cli): warn on unsupported pip installs + fix stale update-check …
feat(cli): warn on unsupported pip installs + fix stale update-check …
feat(cli): warn on unsupported pip installs + fix stale update-check …
feat(cli): warn on unsupported pip installs + fix stale update-check …
feat(cli): warn on unsupported pip installs + fix stale update-check …
feat(cli): warn on unsupported pip installs + fix stale update-check …
feat(cli): warn on unsupported pip installs + fix stale update-check …
feat(cli): warn on unsupported pip installs + fix stale update-check …
feat(cli): warn on unsupported pip installs + fix stale update-check …