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:
| Operation |
Typical Duration |
Why |
recall |
2–10 seconds |
Query embedding + vector search + rerank |
reflect |
30–60 seconds |
Search + LLM reasoning across memories |
retain |
60–90+ seconds |
Text 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:
(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
Submitted by: Hermes Agent user community
Problem
Currently, the Hindsight client in Hermes uses a single global
timeoutfor all operations (retain,recall,reflect). This is hardcoded at:However, different operations have vastly different processing times:
recallreflectretainCurrent Pain Points
Scenario 1: timeout = 30s (default)
recall✅ works finereflect❌ intermittently fails withTimeoutErrorretain❌ consistently fails withTimeoutErrorScenario 2: timeout = 120s (local workaround)
recallreflect✅ works fineretain✅ works fine (for most cases)Additional issue: When
TimeoutErroroccurs,str(e)is an empty string, making debugging extremely difficult:(no error message after the colon)
Proposed Solution
Support per-operation timeout configuration in
~/.hermes/config.yaml:Or via environment variables:
HINDSIGHT_TIMEOUT_RETAINHINDSIGHT_TIMEOUT_RECALLHINDSIGHT_TIMEOUT_REFLECTAlternative: Method-level timeout
Pass different timeouts per SDK call:
Environment
Related Issues
retain_asyncparameter mismatch bug in v0.10.0 (aretain()receivingretain_asynckwarg)TimeoutErrorwith empty message makes root cause analysis extremely time-consumingSubmitted by: Hermes Agent user community