diff --git a/honcho_integration/cli.py b/honcho_integration/cli.py index 15d1586966..c8fa2dea2b 100644 --- a/honcho_integration/cli.py +++ b/honcho_integration/cli.py @@ -157,11 +157,11 @@ def cmd_setup(args) -> None: cfg["recallMode"] = new_recall # Session strategy - current_strat = cfg.get("sessionStrategy", "per-directory") + current_strat = cfg.get("sessionStrategy", "per-session") print(f"\n Session strategy options:") - print(" per-directory — one session per working directory (default)") + print(" per-session — new Honcho session each run, named by Hermes session ID (default)") + print(" per-directory — one session per working directory") print(" per-repo — one session per git repository (uses repo root name)") - print(" per-session — new Honcho session each run, named by Hermes session ID") print(" global — single session across all directories") new_strat = _prompt("Session strategy", default=current_strat) if new_strat in ("per-session", "per-repo", "per-directory", "global"): @@ -715,7 +715,7 @@ def cmd_migrate(args) -> None: print() print(" Session naming") print(" OpenClaw: no persistent session concept — files are global.") - print(" Hermes: per-directory by default — each project gets its own session") + print(" Hermes: per-session by default — each run gets its own session") print(" Map a custom name: hermes honcho map ") # ── Step 6: Next steps ──────────────────────────────────────────────────── diff --git a/honcho_integration/client.py b/honcho_integration/client.py index 729bb42cad..3f3f174d1d 100644 --- a/honcho_integration/client.py +++ b/honcho_integration/client.py @@ -95,7 +95,7 @@ class HonchoClientConfig: # "tools" — no pre-loaded context, rely on tool calls only recall_mode: str = "hybrid" # Session resolution - session_strategy: str = "per-directory" + session_strategy: str = "per-session" session_peer_prefix: bool = False sessions: dict[str, str] = field(default_factory=dict) # Raw global config for anything else consumers need @@ -201,7 +201,7 @@ class HonchoClientConfig: or raw.get("recallMode") or "hybrid" ), - session_strategy=raw.get("sessionStrategy", "per-directory"), + session_strategy=raw.get("sessionStrategy", "per-session"), session_peer_prefix=raw.get("sessionPeerPrefix", False), sessions=raw.get("sessions", {}), raw=raw, diff --git a/tests/honcho_integration/test_client.py b/tests/honcho_integration/test_client.py index fb3d83739e..d779d9a637 100644 --- a/tests/honcho_integration/test_client.py +++ b/tests/honcho_integration/test_client.py @@ -25,7 +25,7 @@ class TestHonchoClientConfigDefaults: assert config.environment == "production" assert config.enabled is False assert config.save_messages is True - assert config.session_strategy == "per-directory" + assert config.session_strategy == "per-session" assert config.recall_mode == "hybrid" assert config.session_peer_prefix is False assert config.linked_hosts == [] @@ -140,7 +140,7 @@ class TestFromGlobalConfig: config_file = tmp_path / "config.json" config_file.write_text(json.dumps({"apiKey": "key"})) config = HonchoClientConfig.from_global_config(config_path=config_file) - assert config.session_strategy == "per-directory" + assert config.session_strategy == "per-session" def test_context_tokens_host_block_wins(self, tmp_path): """Host block contextTokens should override root."""