fix: make hindsight client timeout configurable via HINDSIGHT_TIMEOUT env var - #10045
fix: make hindsight client timeout configurable via HINDSIGHT_TIMEOUT env var#10045nightq wants to merge 4 commits into
Conversation
Fixes NousResearch#9999 Root cause: _sanitize_api_messages compared raw tool_call_id strings without stripping whitespace, causing valid tool results to be treated as orphaned when IDs had leading/trailing spaces. Fix: strip whitespace in _get_tool_call_id_static and when collecting result_call_ids from tool messages.
Fixes NousResearch#9980 Root cause: _send_raw_message hardcoded 'chat_id' as receive_id_type, causing [230001] invalid receive_id errors when sending to user open_ids (prefix 'ou_') or union_ids (prefix 'on_'). Fix: Add _detect_receive_id_type() that checks ID prefix (oc_→chat_id, ou_→open_id, on_→union_id) and use it in _send_raw_message.
Fixes NousResearch#9950 Root cause: Prompts discarded for having no reasoning were not added to completed_in_batch, causing --resume to retry them indefinitely. Fix: Append prompt_index to completed_in_batch before continuing past the discard branch.
… env var Fixes NousResearch#9869 Root cause: Hindsight cloud client had hardcoded 30s timeout, causing hindsight_reflect to fail for longer operations. Fix: Read timeout from HINDSIGHT_TIMEOUT env var with default of 300s.
|
This would be great! For now, I have told the agent to just retain and recall and avoid reflecting on anything 😆 Another issue I have noticed is that I tried to self-host Hindsight "the correct way" by having a separate Docker container serve the API and MCP, but the cloud and local options for the plugin didn't pair nicely with that. I managed to duct tape together a solution, but I think it's not a very elegant one. |
|
Likely duplicate of #9985 — same fix: make Hindsight cloud client timeout configurable via HINDSIGHT_TIMEOUT env var (default 300s). |
|
|
|
Thanks for the collection of fixes. The Hindsight timeout portion has already landed, consistent with the follow-up comment on this PR. Problems
Suggested changes
Automated hermes-sweeper review. |
Related to merged #15077: the Hindsight timeout configuration is already on |
The Hindsight timeout portion is already in merged #15077, while the Feishu edit targets a retired adapter path and other hunks are independent. Please rebase and split the residual work for review. |
The live branch bundles four unrelated fixes, including a retired Feishu gateway path. Please rebase and split the Hindsight timeout change from the Feishu, agent sanitizer, and batch-runner changes so the remaining current-main deltas can be reviewed. |
The live patch bundles Hindsight timeout configuration with unrelated Feishu delivery, run-agent, and batch-runner changes. Please split or rebase the remaining residual work before review. |
This branch mixes the Hindsight timeout change with Feishu, tool-call sanitizer, and batch-runner work. Current main already has a configurable Hindsight timeout and Feishu has moved to the plugin adapter; please rebase and split any remaining delta. |
Summary
Makes the Hindsight cloud client timeout configurable to prevent
hindsight_reflectfailures on longer operations.Root Cause
The Hindsight cloud client was initialized with a hardcoded 30s timeout. The
hindsight_reflecttool performs LLM synthesis across the memory graph, which routinely takes longer than 30 seconds. While_run_sync()has a 120s wrapper, the inner HTTP client timeout fires first.Fix
Read timeout from
HINDSIGHT_TIMEOUTenv var with a default of 300s (matching other Hermes timeout defaults).Test Plan
Closes #9869