hermes-agent/plugins/memory
Erosika 6ea01262fc fix(honcho): recover memory from mid-session oauth 401s and tell the user once
An expired access token could pause Honcho memory for hours with no
user-facing signal: ensure_fresh_token swallowed every exchange failure
and returned the stale token, no code handled a 401 from the Honcho API,
and each failed dialectic cycle widened the cadence backoff. Hypothesis
for the trigger (not confirmed): the refresh POST times out after the
server already rotated the token pair, Hermes keeps the old refresh
token, and the eventual replay lands outside the server's 60-second
rotation grace window, which revokes the whole grant.

- oauth: the exchange reads the token endpoint's error body instead of
  discarding it. invalid_grant and other permanent OAuth errors mark the
  grant dead so no code retries a revoked grant; transient failures retry
  once immediately, which keeps a replayed refresh token inside the grace
  window. Log lines redact token values.
- oauth: force_refresh_token() rotates the token now, ignoring local
  expiry, to recover from a server-side 401.
- session: dialectic_query and _flush_session treat a 401 as a trigger to
  force one token rotation and retry the call exactly once. A persistent
  auth failure raises HonchoAuthError (dialectic) or records the failure
  (sync) instead of being returned as an empty result.
- provider: injects a one-time notice into the memory context so the
  model tells the user memory is paused and 'hermes honcho setup'
  restores it. Auth failures no longer widen the dialectic cadence
  backoff.

New tests cover the exchange retry, invalid_grant terminality plus
re-login recovery, forced refresh, 401 retry on both the sync and
dialectic paths, the one-time notice, and the backoff exemption.
2026-08-08 14:40:46 +05:30
..
byterover fix: add explicit UTF-8 encoding to all subprocess text=True calls (#53428) 2026-07-24 11:45:57 -07:00
hindsight fix(secrets): scope memory plugin credential reads (hindsight/honcho/supermemory/mem0/retaindb) 2026-08-02 10:04:48 -07:00
holographic fix(memory): resolve dim=1 float32/float64 blob ambiguity 2026-08-02 22:33:13 +05:30
honcho fix(honcho): recover memory from mid-session oauth 401s and tell the user once 2026-08-08 14:40:46 +05:30
mem0 fix(secrets): scope memory plugin credential reads (hindsight/honcho/supermemory/mem0/retaindb) 2026-08-02 10:04:48 -07:00
openviking fix(openviking): catch endpoint errors in setup validation functions 2026-08-03 20:35:47 +05:30
retaindb test(retaindb): guard scoped secret config resolution 2026-08-03 20:35:47 +05:30
supermemory fix(secrets): scope memory plugin credential reads (hindsight/honcho/supermemory/mem0/retaindb) 2026-08-02 10:04:48 -07:00
__init__.py fix(windows): sweep remaining bare read_text/write_text sites + linter rule 2026-07-24 17:10:39 -07:00
config_schema.py revert(memory): drop the provider actions extension point 2026-07-10 15:41:52 -04:00
query_rewrite.py fix(honcho): enforce recall latency and budget contracts 2026-07-16 12:48:48 -07:00