hermes - 💡(How to fix) Fix Feature Request: Per-operation timeout configuration for Hindsight memory provider [1 participants]

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…
GitHub stats
NousResearch/hermes-agent#14950Fetched 2026-04-24 10:44:03
View on GitHub
Comments
0
Participants
1
Timeline
4
Reactions
0
Author
Participants
Timeline (top)
labeled ×4

Error Message

(no error message after the colon)

Root Cause

  • #14550 — retain_async parameter mismatch bug in v0.10.0 (aretain() receiving retain_async kwarg)
  • TimeoutError with empty message makes root cause analysis extremely time-consuming

Fix Action

Fix / Workaround

Scenario 2: timeout = 120s (local workaround)

  • recall ⚠️ waits 2 minutes before failing if server is down (bad UX)
  • reflect ✅ works fine
  • retain ✅ works fine (for most cases)

Code Example

# plugins/memory/hindsight/__init__.py, line ~532
kwargs = {"base_url": self._api_url, "timeout": 30.0}

---

Failed to store memory:

---

memory:
  provider: hindsight
  config:
    # Global fallback (optional, backward compatible)
    timeout: 30
    
    # Per-operation overrides
    timeout_retain: 120
    timeout_recall: 30
    timeout_reflect: 90

---

# In handle_tool_call() for hindsight_retain:
_run_sync(client.aretain(**retain_kwargs), timeout=self._timeout_retain)

# In handle_tool_call() for hindsight_recall:
_run_sync(client.arecall(**recall_kwargs), timeout=self._timeout_recall)
RAW_BUFFERClick to expand / collapse

Problem

Currently, the Hindsight client in Hermes uses a single global timeout for all operations (retain, recall, reflect). This is hardcoded at:

# plugins/memory/hindsight/__init__.py, line ~532
kwargs = {"base_url": self._api_url, "timeout": 30.0}

However, different operations have vastly different processing times:

OperationTypical DurationWhy
recall2–10 secondsQuery embedding + vector search + rerank
reflect30–60 secondsSearch + LLM reasoning across memories
retain60–90+ secondsText chunking + embedding + entity extraction + knowledge graph building + indexing

Current Pain Points

Scenario 1: timeout = 30s (default)

  • recall ✅ works fine
  • reflect ❌ intermittently fails with TimeoutError
  • retain ❌ consistently fails with TimeoutError

Scenario 2: timeout = 120s (local workaround)

  • recall ⚠️ waits 2 minutes before failing if server is down (bad UX)
  • reflect ✅ works fine
  • retain ✅ works fine (for most cases)

Additional issue: When TimeoutError occurs, str(e) is an empty string, making debugging extremely difficult:

Failed to store memory:

(no error message after the colon)

Proposed Solution

Support per-operation timeout configuration in ~/.hermes/config.yaml:

memory:
  provider: hindsight
  config:
    # Global fallback (optional, backward compatible)
    timeout: 30
    
    # Per-operation overrides
    timeout_retain: 120
    timeout_recall: 30
    timeout_reflect: 90

Or via environment variables:

  • HINDSIGHT_TIMEOUT_RETAIN
  • HINDSIGHT_TIMEOUT_RECALL
  • HINDSIGHT_TIMEOUT_REFLECT

Alternative: Method-level timeout

Pass different timeouts per SDK call:

# In handle_tool_call() for hindsight_retain:
_run_sync(client.aretain(**retain_kwargs), timeout=self._timeout_retain)

# In handle_tool_call() for hindsight_recall:
_run_sync(client.arecall(**recall_kwargs), timeout=self._timeout_recall)

Environment

  • Hermes Agent Version: v0.10.0
  • Hindsight Mode: local_external
  • Hindsight Server: external instance (192.168.0.16:8888)
  • Custom embedding/rerank service: free tier (thread-limited, slower processing)

Related Issues

  • #14550 — retain_async parameter mismatch bug in v0.10.0 (aretain() receiving retain_async kwarg)
  • TimeoutError with empty message makes root cause analysis extremely time-consuming

Submitted by: Hermes Agent user community

extent analysis

TL;DR

Implement per-operation timeout configuration to address the issue of different operations having vastly different processing times.

Guidance

  • Introduce per-operation timeout overrides in ~/.hermes/config.yaml or via environment variables (HINDSIGHT_TIMEOUT_RETAIN, HINDSIGHT_TIMEOUT_RECALL, HINDSIGHT_TIMEOUT_REFLECT) to allow for more flexible timeout settings.
  • Consider passing different timeouts per SDK call using the method-level timeout approach to provide more fine-grained control over timeouts.
  • Review the retain, recall, and reflect operations to determine the optimal timeout values based on their typical durations.
  • Verify that the new timeout configuration resolves the TimeoutError issues and improves the overall performance of the Hindsight client.

Example

# In handle_tool_call() for hindsight_retain:
_run_sync(client.aretain(**retain_kwargs), timeout=self._timeout_retain)

# In handle_tool_call() for hindsight_recall:
_run_sync(client.arecall(**recall_kwargs), timeout=self._timeout_recall)

Notes

The proposed solution requires updates to the Hindsight client configuration and potentially the SDK calls. It is essential to test the new configuration thoroughly to ensure that it resolves the existing issues and does not introduce new problems.

Recommendation

Apply the per-operation timeout configuration workaround to address the current pain points and improve the overall performance of the Hindsight client. This approach allows for more flexible timeout settings and can help mitigate the TimeoutError issues.

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 Feature Request: Per-operation timeout configuration for Hindsight memory provider [1 participants]