The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
fix(cli): align hermes memory status and docs with memory tool gate
Cassie Grayb38c40319d05
diff --git a/hermes_cli/memory_setup.py b/hermes_cli/memory_setup.pyindex 0087d61fd5a..5113b4937cb 100644--- a/hermes_cli/memory_setup.py+++ b/hermes_cli/memory_setup.py@@ -490,10 +490,11 @@ def cmd_status(args) -> None:user_mark = "enabled ✓" if user_profile_enabled else "disabled ✗"# Check if the memory tool is enabled for the CLI platform via the- # canonical resolver (handles composite toolsets like hermes-cli).+ # canonical resolver and respects the check_fn gate when both stores are disabled.from hermes_cli.tools_config import _get_platform_tools+ from tools.memory_tool import check_memory_requirementscli_tools = _get_platform_tools(config, "cli", include_default_mcp_servers=False)- memory_tool_enabled = "memory" in cli_tools+ memory_tool_enabled = ("memory" in cli_tools) and check_memory_requirements()tool_mark = "enabled ✓" if memory_tool_enabled else "disabled ✗"print("\nMemory status\n" + "─" * 40)diff --git a/tests/hermes_cli/test_memory_setup.py b/tests/hermes_cli/test_memory_setup.pyindex 8bcb6a3b163..674a9b51d14 100644--- a/tests/hermes_cli/test_memory_setup.py+++ b/tests/hermes_cli/test_memory_setup.py@@ -96,3 +96,35 @@ def test_install_dependencies_force_reinstalls_versioned_specs(tmp_path, monkeypassert installed, "force=True must reach the install step"assert any("mem0ai>=2.0.10,<3" in specs for specs in installed)+++def test_cmd_status_memory_tool_gate_disabled(capsys, monkeypatch):+ """When both memory stores are disabled, Memory status reports memory tool as disabled."""+ monkeypatch.setattr(+ "hermes_cli.config.load_config",+ lambda: {"memory": {"memory_enabled": False, "user_profile_enabled": False}},+ )+ monkeypatch.setattr(memory_setup, "_get_available_providers", lambda: [])++ memory_setup.cmd_status(SimpleNamespace())++ captured = capsys.readouterr().out+ assert "Memory tool: disabled ✗" in captured+ assert "Memory injection: disabled ✗" in captured+ assert "User profile: disabled ✗" in captured+++def test_cmd_status_memory_tool_gate_enabled(capsys, monkeypatch):+ """When at least one memory store is enabled, Memory status reports memory tool as enabled."""+ monkeypatch.setattr(+ "hermes_cli.config.load_config",+ lambda: {"memory": {"memory_enabled": True, "user_profile_enabled": False}},+ )+ monkeypatch.setattr(memory_setup, "_get_available_providers", lambda: [])++ memory_setup.cmd_status(SimpleNamespace())++ captured = capsys.readouterr().out+ assert "Memory tool: enabled ✓" in captured+ assert "Memory injection: enabled ✓" in captured+ assert "User profile: disabled ✗" in captureddiff --git a/website/docs/user-guide/features/memory.md b/website/docs/user-guide/features/memory.mdindex cf575508ab1..11a1f2376f9 100644--- a/website/docs/user-guide/features/memory.md+++ b/website/docs/user-guide/features/memory.md@@ -266,7 +266,7 @@ first, set `memory.write_approval: true`. It's a simple on/off gate applied to| `false` (default) | Write freely — the gate is off (the pre-gate behaviour). || `true` | Require approval before anything is saved. In the interactive CLI, foreground writes prompt you inline (entries are small enough to read in full). Everywhere else — messaging platforms, scripts, and the background self-improvement review — writes are **staged** for review with `/memory pending`. |-> To turn memory off entirely (not just gate it), set `memory_enabled: false`.+> To turn memory off entirely (not just gate it), set both `memory_enabled: false` and `user_profile_enabled: false`. When both built-in stores are disabled, the built-in `memory` tool is automatically hidden.Review staged writes from the CLI or any messaging platform: