Skip to content

The agent that grows with you

fix(honcho): surface honcho_reasoning backend failures instead of 'No result'

Erosikac28c43470616
diff --git a/plugins/memory/honcho/__init__.py b/plugins/memory/honcho/__init__.py
index 8bf9676e571..331950e6965 100644
--- a/plugins/memory/honcho/__init__.py
+++ b/plugins/memory/honcho/__init__.py
@@ -1527,13 +1527,31 @@ class HonchoMemoryProvider(MemoryProvider):
return tool_error("Missing required parameter: query")
peer = args.get("peer", "user")
reasoning_level = args.get("reasoning_level")
- result = self._manager.dialectic_query(
- self._session_key, query,
- reasoning_level=reasoning_level,
- peer=peer,
- # Explicit reasoning bypasses the automatic-injection cap.
- apply_injection_cap=False,
- )
+ try:
+ result = self._manager.dialectic_query(
+ self._session_key, query,
+ reasoning_level=reasoning_level,
+ peer=peer,
+ # Explicit reasoning bypasses the automatic-injection cap.
+ apply_injection_cap=False,
+ # Explicit tool call: surface timeouts/server errors as
+ # errors instead of collapsing them into "no result",
+ # which is indistinguishable from an empty answer.
+ raise_errors=True,
+ )
+ except HonchoAuthError:
+ # Let the outer dispatch's auth-specific handler render this.
+ raise
+ except Exception as e:
+ logger.warning("honcho_reasoning failed: %s", e)
+ return tool_error(
+ f"Honcho reasoning query failed ({e}). This is a backend "
+ "error, not an empty result — the peer may still have "
+ "relevant context. Slow dialectic calls at higher "
+ "reasoning levels can exceed the configured timeout; "
+ "consider a lower reasoning_level or raising the "
+ "'timeout' value in honcho.json."
+ )
# Update cadence tracker so auto-injection respects the gap after an explicit call
self._last_dialectic_turn = self._turn_count
return json.dumps({"result": result or "No result from Honcho."})
diff --git a/plugins/memory/honcho/session.py b/plugins/memory/honcho/session.py
index efaa9863331..3944c960cc4 100644
--- a/plugins/memory/honcho/session.py
+++ b/plugins/memory/honcho/session.py
@@ -844,6 +844,7 @@ class HonchoSessionManager:
reasoning_level: str | None = None,
peer: str = "user",
apply_injection_cap: bool = True,
+ raise_errors: bool = False,
) -> str:
"""
Query Honcho's dialectic endpoint about a peer.
@@ -862,6 +863,11 @@ class HonchoSessionManager:
apply_injection_cap: Clip automatic injections to
``dialecticMaxChars``. Explicit ``honcho_reasoning`` calls pass
False because Honcho already bounds their output.
+ raise_errors: Re-raise backend failures instead of returning "".
+ Explicit tool calls pass True so a timeout or server error
+ surfaces as an error, not as "no result" (#36098 issue 4:
+ collapsing failures to "" made auth errors, timeouts, and
+ genuinely-empty answers indistinguishable).
Returns:
Honcho's synthesized answer, or empty string on failure.
@@ -917,6 +923,8 @@ class HonchoSessionManager:
raise
except Exception as e:
logger.warning("Honcho dialectic query failed: %s", e)
+ if raise_errors:
+ raise
return ""
def prefetch_context(self, session_key: str, user_message: str | None = None) -> None: