hermes - 💡(How to fix) Fix [Bug]: Banner shows "1 commit behind" inside Docker even though no git history exists — PyPI fallback mislabels version gap as literal commits [1 pull requests]

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…

Error Message

Additional Logs / Traceback (optional)

Root Cause

Root Cause

Fix Action

Fixed

Code Example

commits_word = "commit" if behind == 1 else "commits"
     right_lines.append(f"[bold yellow]⚠ {behind} {commits_word} behind[/]")

---

Report       https://paste.rs/XquHj
agent.log    https://paste.rs/ezvaN
gateway.log  https://paste.rs/Jt7pn

---
RAW_BUFFERClick to expand / collapse

Bug Description

When Hermes runs inside a Docker container built from a git clone (via docker compose up --build), the startup banner displays:

⚠ 1 commit behind — run docker pull nousresearch/hermes-agent:latest to update

This is misleading. The container has no .git directory (excluded by .dockerignore), so the update check falls back to a PyPI version comparison. The PyPI fallback returns 1 as a boolean "newer version exists," but the display layer renders it as a literal commit count.

Root Cause

  1. check_for_updates() in hermes_cli/banner.py tries HEAD..origin/main first.
  2. Because .dockerignore drops .git from the build context, the running image has no git repo.
  3. That triggers the PyPI fallback: check_via_pypi() compares installed VERSION against PyPI latest.
  4. check_via_pypi() returns 1 when the installed version is older (semantics: "update exists").

Then at line ~660:

     commits_word = "commit" if behind == 1 else "commits"
     right_lines.append(f"[bold yellow]⚠ {behind} {commits_word} behind[/]")

When behind == 1 from the PyPI fallback, the user sees "1 commit behind" even though no commits were ever counted. The comparison was version-to-version, not HEAD-to-origin.

Steps to Reproduce

  1. Git clone NousResearch/hermes-agent.
  2. Include the default .dockerignore (has .git excluded).
  3. docker compose up --build.
  4. Enter the running container and run hermes --version (or interact via TUI)

Expected Behavior

When the source is PyPI (not git), the banner should say something like:

  • "Update available (0.14.0 → 0.15.2)" or
  • "1 version behind" or
  • Simply "⚠ update available"

Using the word "commit" implies a git comparison, which never happened.

Actual Behavior

Banner shows "1 commit behind" despite no git history in /opt/hermes.

Affected Component

Configuration (config.yaml, .env, hermes setup)

Messaging Platform (if gateway-related)

No response

Debug Report

Report       https://paste.rs/XquHj
agent.log    https://paste.rs/ezvaN
gateway.log  https://paste.rs/Jt7pn

Operating System

Linux Mint 21.3 (host)

Python Version

Python 3.14.3 (host)

Hermes Version

v0.14.0 (2026.5.16)

Additional Logs / Traceback (optional)

Root Cause Analysis (optional)

No response

Proposed Fix (optional)

Distinguish the return value semantics in check_for_updates():

  • Keep the integer return for git-based checks (accurate commit count).
  • Return a sentinel (e.g. UPDATE_AVAILABLE_NO_COUNT = -1) from check_via_pypi(), which the banner already has handling for (line ~665). Or change check_via_pypi() to return a distinct sentinel so the renderer can say "update available" instead of "1 commit behind."

Alternatively, update the banner renderer to check which source produced the behind value and choose wording accordingly.

Are you willing to submit a PR for this?

  • I'd like to fix this myself and submit a PR

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

hermes - 💡(How to fix) Fix [Bug]: Banner shows "1 commit behind" inside Docker even though no git history exists — PyPI fallback mislabels version gap as literal commits [1 pull requests]