NousResearch/hermes-agent

Fork upstream sync in hermes update command

Cluster 26172 · hermes cli. Data as of

Nothing open on GitHub. Fix merged in #33452 on 27 May 2026. Check it covers your case.

The short answer

0open issues
0open PRs
4items grouped
Known?
Yes. 4 related items grouped here, 1 issue already closed.
Fix event
A fix was merged to main in PR #33452. Check it covers your case. No release data is tracked.
Tracker
The maintainers' tracker marks this resolved, deciding PR #33452. That is separate from the fix event.
Still open
Nothing open on GitHub.

These issues and PRs address a bug where hermes update incorrectly reports 'Already up to date' on forks when the upstream remote is ahead of origin. Multiple fix attempts focus on consulting upstream before returning early.

Open issues0

No open issues.

Open PRs0

No open pull requests.

Fixes on record

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

  • #33452 fix(update): check upstream even when origin/main has no new commits (salvages #4873)

    merged to main

    files: hermes_cli/main.py, tests/hermes_cli/test_cmd_update.py

    Show the diff
    • hermes_cli/main.py
      @@ -8928,6 +8928,11 @@ def _cmd_update_impl(args, gateway_mode: bool):
       
               if commit_count == 0:
                   _invalidate_update_cache()
      +
      +            # Even if origin is up to date, the fork may be behind upstream
      +            if is_fork and branch == "main":
      +                _sync_with_upstream_if_needed(git_cmd, PROJECT_ROOT)
      +
                   # Restore stash and switch back to original branch if we moved
                   if auto_stash_ref is not None:
                       _restore_stashed_changes(
    • tests/hermes_cli/test_cmd_update.py
      @@ -106,6 +106,33 @@ def test_update_already_up_to_date(
               pull_cmds = [c for c in commands if "pull" in c]
               assert len(pull_cmds) == 0
       
      +    @patch("shutil.which", return_value=None)
      +    @patch("subprocess.run")
      +    def test_update_on_fork_checks_upstream_when_origin_up_to_date(
      +        self, mock_run, _mock_which, mock_args, capsys
      +    ):
      +        """Regression for issue #26172: forks whose local HEAD already matches
      +        origin/main must still consult upstream/main before printing
      +        "Already up to date!" — otherwise a fork that's caught up to its own
      +        origin but behind NousResearch/hermes-agent silently misses updates.
      +        """
      +        from hermes_cli import main as hm
      +
      +        mock_run.side_effect = _make_run_side_effect(
      +            branch="main", verify_ok=True, commit_count="0"
      +        )
      +
      +        with patch.object(
      +            hm,
      +            "_get_origin_url",
      +            return_value="https://github.com/example/hermes-agent.git",
      +        ), patch.object(hm, "_sync_with_upstream_if_needed") as sync_mock:
      +            cmd_update(mock_args)
      +
      +        sync_mock.assert_called_once_with(["git"], PROJECT_ROOT)
      +        captured = capsys.readouterr()
      +        assert "Already up to date!" in captured.out
      +
           @patch("shutil.which")
           @patch("subprocess.run")
           def test_update_refreshes_repo_and_tui_node_dependencies(

2 PRs closed without merging

From the close comments: done elsewhere 1 · superseded by another PR 1

  • #26249 fix(update): consult upstream before early return · done elsewhere → 6f2a2f1, 53bdef5, #33452, #4873, #26172
  • #29524 fix(update): sync fork from upstream before fetch/pull · superseded by another PR → #33452, #4873, #26172
Closed issues · 1
  • Closed#26172`hermes update` on forks reports "Already up to date!" when origin/main matches HEAD but upstream/main is ahead
How this cluster was grouped
  • Link evidence (structural links throughout): every member is connected by structural evidence: shared changed files, or a closing/superseded reference.
  • Pairwise link density 0.50: 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.

Pick up a Lab task

Check whether a fix covers the open issues here, with your own agent. Bring back evidence for maintainers.

Open the Lab

At a glance

Subsystem
hermes cli
Merged PRs
#33452
Closed issues
1
Attempts
2 PRs closed without merging
Fix link checked
27 May 2026

For your agent

The same facts, typed.