Skip to content

fix(hermes): skip cron runs, honour HINDSIGHT_BANK_ID, add reflect_tags, re-probe an unreachable server - #5538

Merged
nicoloboschi merged 2 commits into
mainfrom
fix/hermes-cron-bankid-reflect-probe
Oct 12, 2026
Merged

nicoloboschi merged 2 commits into
mainfrom
fix/hermes-cron-bankid-reflect-probe

Conversation

@nicoloboschi

Copy link
Copy Markdown
Collaborator

Closes #4945, closes #5171, closes #5170, closes #5221.

Issue Change
#4945 Cron runs (agent_context="cron") are no longer auto-retained, per Hermes' provider contract. New retain_cron (default false) opts back in. The hindsight_retain tool still works in cron runs.
#5171 A non-empty HINDSIGHT_BANK_ID wins over bank_id in config.json, as the README promised. A bank_id_template still takes precedence.
#5170 New reflect_tags / reflect_tags_match scope reflect (the tool and recall_prefetch_method: reflect). Opt-in; recall_tags still never apply to reflect, so existing installs are unchanged.
#5221 Only the server's own answer to the version probe is cached. An unreachable server (connection error, timeout, 5xx) is asked again after 60s instead of disabling append for the whole process. Like the coding-agents client, the probe tries /v1/version before /version (#5286). The 60s window keeps a hung server from stalling every turn on the probe timeout.

README documents the three new settings and the env-var precedence; the docs page and docs skill are regenerated from it.

Tests: 11 new in tests/test_provider.py; the 7 that cover the bugs fail on main, the other 4 guard unchanged behaviour. uv run pytest tests → 138 passed.

Manual test (real Hermes + real server)

Driven through Hermes' own load_memory_provider + MemoryManager (hermes-agent checkout) against a local hindsight-api, once with origin/main's plugin and once with this branch.

Scenario main this PR
cron run, default config saved not saved (retain_cron: true saves it; primary runs still saved)
HINDSIGHT_BANK_ID=env-bank, config.json bank_id: config-bank wrote to config-bank wrote to env-bank
reflect_tags: team-a (and recall_tags: team-b), bank has a team-a and a team-b fact reflect named both people reflect named only the team-a person
version probe: server down at startup, then up still no append after 61s append detected after 61s

Closed #5424 as not planned separately.

…gs, re-probe an unreachable server

- #4945: cron runs (agent_context="cron") are no longer auto-retained, per
  Hermes' provider contract. New retain_cron (default false) opts back in;
  the hindsight_retain tool still works in cron runs.
- #5171: a non-empty HINDSIGHT_BANK_ID wins over bank_id in config.json, as
  documented. A bank_id_template still takes precedence.
- #5170: new reflect_tags / reflect_tags_match scope reflect (tool and
  reflect prefetch). Opt-in; recall_tags still never apply to reflect.
- #5221: only the server's own answer to the version probe is cached. An
  unreachable server (connection error, timeout, 5xx) is asked again after
  60s instead of disabling append for the whole process. The probe tries
  /v1/version before /version, like the coding-agents client (#5286).
- A 404 on /v1/version plus a timeout or 5xx on /version used to cache 'old
  server' forever, the #5221 bug in a narrower case. Any unanswered path now
  keeps the result unknown and retries after the window; a non-JSON body
  still counts as an answer.
- Drop a no-op line from the test's fake version server.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment