Skip to content

[Bug]: Hindsight plugin hardcoded 30s timeout causes hindsight_reflect to fail #9869

@jbotwell

Description

@jbotwell

Bug Description

Body:

Bug Description

In plugins/memory/hindsight/__init__.py line 461, the Hindsight cloud client is instantiated with a hardcoded 30-second timeout:

kwargs = {"base_url": self._api_url, "timeout": 30.0}

The hindsight_reflect tool performs LLM synthesis across the memory graph, which routinely takes longer than 30 seconds — especially with larger memory banks or when using slower LLM prov

Note: _run_sync() has a 120-second timeout wrapper, but the underlying HTTP client inside hindsight_client enforces its own 30-second timeout, so the outer wrapper never gets a chance to hit

Expected Behavior

hindsight_reflect should complete successfully for normal reflect operations, which can take well over 30 seconds.

I have it configured to hit Groq's gpt-oss-20b, which should be pretty speedy. It does not fail every time, but it does sometimes. That's also one of the fastest natively supported hindsight models, and pretty fast in general unless we are comparing to Cerebras' gpt-oss-120b

Root Cause

  • File: plugins/memory/hindsight/__init__.py
  • Line: 461
  • Code: kwargs = {"base_url": self._api_url, "timeout": 30.0}

Proposed Fix

Make the timeout configurable via an environment variable or config.json, e.g. HINDSIGHT_TIMEOUT, with a default higher than 30 seconds (e.g. 300 to match the _run_sync 120s wrapper and other Hermes timeouts).

# Read from env/config, default to 300s
timeout = float(os.environ.get("HINDSIGHT_TIMEOUT", 300.0))
kwargs = {"base_url": self._api_url, "timeout": timeout}

Workaround

None available to users — the timeout is hardcoded in the plugin.

Impact

  • Affects: hindsight_reflect tool only (LLM synthesis)
  • Does not affect: hindsight_retain, hindsight_recall (faster operations)
  • Severity: Medium — makes the reflect feature unusable for many queries

Steps to Reproduce

  1. Run hermes chat
  2. Ask to do a hindsight-reflect

Expected Behavior

  1. Run hermes chat
  2. Ask to do a hindsight-reflect
  3. Reflect succeeds or at least tries for longer

Actual Behavior

  1. Run hermes chat
  2. Ask to do a hindsight-reflect
  3. Timeout about 50% of the time (with fast model)

Affected Component

Agent Core (conversation loop, context compression, memory)

Messaging Platform (if gateway-related)

No response

Debug Report

https://paste.rs/DLIf7

Operating System

Nixos 25.11/unstable

Python Version

No response

Hermes Version

No response

Additional Logs / Traceback (optional)

Root Cause Analysis (optional)

No response

Proposed Fix (optional)

Let me know if you'd like me to make a PR, but I'll wait for the go-ahead

Are you willing to submit a PR for this?

  • I'd like to fix this myself and submit a PR

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions