Skip to content

fix: make Hindsight cloud client timeout configurable#9985

Closed
nightq wants to merge 1 commit into
NousResearch:mainfrom
nightq:fix/issue-9869-hindsight-timeout
Closed

fix: make Hindsight cloud client timeout configurable#9985
nightq wants to merge 1 commit into
NousResearch:mainfrom
nightq:fix/issue-9869-hindsight-timeout

Conversation

@nightq

@nightq nightq commented Apr 15, 2026

Copy link
Copy Markdown

Summary

The hindsight_reflect tool was failing intermittently because the Hindsight cloud client had a hardcoded 30-second HTTP timeout, while LLM synthesis across the memory graph routinely takes longer — especially with larger memory banks or slower providers.

Root Cause

Line 461 of plugins/memory/hindsight/__init__.py hardcoded timeout: 30.0 when creating the Hindsight cloud client. The outer \_run_sync() wrapper has a 120s timeout, but the inner HTTP client enforces its own 30s limit, so requests never get a chance to complete.

Fix

Made the timeout configurable via the HINDSIGHT_TIMEOUT environment variable, with a default of 300 seconds to match the outer wrapper and other Hermes timeouts.

Test Plan

  • Run hindsight_reflect with a large memory bank — should no longer timeout at 30s
  • Set HINDSIGHT_TIMEOUT=60 to override the default
  • Verify hindsight_retain and hindsight_recall are unaffected

Closes #9869

…IMEOUT

Fixes NousResearch#9869

Root cause: Hindsight cloud client hardcoded 30s timeout, but
hindsight_reflect operations can take much longer with larger memory banks
Fix: Read timeout from HINDSIGHT_TIMEOUT env var with 300s default

@nicoloboschi nicoloboschi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you rename it HINDSIGHT_HTTP_TIMEOUT?

@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/plugins Plugin system and bundled plugins labels Apr 23, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Likely duplicate of #10045 — same HINDSIGHT_TIMEOUT env var fix for the hardcoded 30s cloud client timeout.

@teknium1

Copy link
Copy Markdown
Contributor

Thanks for the contribution @nightq! This fix has already landed on main via a direct commit — so this PR is no longer needed.

Automated hermes-sweeper review.

  • The HINDSIGHT_TIMEOUT env var and configurable default are already implemented in plugins/memory/hindsight/__init__.py as of commit 403c82b6b (feat(hindsight): add configurable HINDSIGHT_TIMEOUT env var).
  • _DEFAULT_TIMEOUT = 120 is set at line 47; the env var is read at line 793; the cloud client uses the configurable timeout at line 726 — covering all three of your fix points.
  • A MEMBER also flagged this as a duplicate of fix: make hindsight client timeout configurable via HINDSIGHT_TIMEOUT env var #10045, which targets the same root cause.

The underlying issue (#9869) is resolved on current main. Closing as implemented.

@teknium1 teknium1 closed this Apr 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/plugins Plugin system and bundled plugins P2 Medium — degraded but workaround exists type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

4 participants