From 45d3e83ad15db87269c2b446e4dd955cbe8664a6 Mon Sep 17 00:00:00 2001 From: Erosika Date: Thu, 12 Mar 2026 16:27:49 -0400 Subject: [PATCH] fix(honcho): normalize legacy recallMode values like 'auto' to 'hybrid' --- honcho_integration/cli.py | 3 ++- honcho_integration/client.py | 12 +++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/honcho_integration/cli.py b/honcho_integration/cli.py index 9526b1a14..270c4b36e 100644 --- a/honcho_integration/cli.py +++ b/honcho_integration/cli.py @@ -151,7 +151,8 @@ def cmd_setup(args) -> None: hermes_host["writeFrequency"] = new_wf if new_wf in ("async", "turn", "session") else "async" # Recall mode - current_recall = hermes_host.get("recallMode") or cfg.get("recallMode", "hybrid") + _raw_recall = hermes_host.get("recallMode") or cfg.get("recallMode", "hybrid") + current_recall = "hybrid" if _raw_recall not in ("hybrid", "context", "tools") else _raw_recall print(f"\n Recall mode options:") print(" hybrid — auto-injected context + Honcho tools available (default)") print(" context — auto-injected context only, Honcho tools hidden") diff --git a/honcho_integration/client.py b/honcho_integration/client.py index 446176bce..507fc9d4f 100644 --- a/honcho_integration/client.py +++ b/honcho_integration/client.py @@ -27,6 +27,16 @@ GLOBAL_CONFIG_PATH = Path.home() / ".honcho" / "config.json" HOST = "hermes" +_RECALL_MODE_ALIASES = {"auto": "hybrid"} +_VALID_RECALL_MODES = {"hybrid", "context", "tools"} + + +def _normalize_recall_mode(val: str) -> str: + """Normalize legacy recall mode values (e.g. 'auto' → 'hybrid').""" + val = _RECALL_MODE_ALIASES.get(val, val) + return val if val in _VALID_RECALL_MODES else "hybrid" + + def _resolve_memory_mode( global_val: str | dict, host_val: str | dict | None, @@ -222,7 +232,7 @@ class HonchoClientConfig: or raw.get("dialecticMaxChars") or 600 ), - recall_mode=( + recall_mode=_normalize_recall_mode( host_block.get("recallMode") or raw.get("recallMode") or "hybrid"