Skip to content

The agent that grows with you

feat: hermes update and doctor tell you when /rollback checkpoints are on and large

teknium1f9c3a8a1863b
diff --git a/hermes_cli/doctor.py b/hermes_cli/doctor.py
index 3d7cd834d60..81a64f76ea1 100644
--- a/hermes_cli/doctor.py
+++ b/hermes_cli/doctor.py
@@ -48,6 +48,7 @@ from hermes_cli.doctor_tools import (
_check_tool_availability,
)
from hermes_cli.doctor_state import (
+ _check_checkpoint_store,
_check_directory_structure,
_check_memory_provider,
_check_profiles,
@@ -113,7 +114,7 @@ DOCTOR_CHECKS = (
(None, _check_config_file), (None, _check_config_drift),
('xAI Model Retirement (May 15, 2026)', _check_xai_retirement),
('Plugin import paths (removed Sep 14, 2026)', _check_plugin_compat), ('Auth Providers', _check_auth_providers),
- ('Directory Structure', _check_directory_structure), (None, _check_state_db),
+ ('Directory Structure', _check_directory_structure), (None, _check_state_db), (None, _check_checkpoint_store),
(None, _check_gateway_supervision), (None, _check_command_installation),
('External Tools', _check_git_and_rg), (None, _check_terminal_backend), (None, _check_node_and_browser),
(None, _check_npm_audit), ('API Connectivity', _check_api_connectivity),
diff --git a/hermes_cli/doctor_state.py b/hermes_cli/doctor_state.py
index 0a66427f0e2..132ef9b6344 100644
--- a/hermes_cli/doctor_state.py
+++ b/hermes_cli/doctor_state.py
@@ -341,6 +341,15 @@ def _check_state_db(should_fix: bool, f: Finding) -> None:
_state_db_wal(f, should_fix, state_db_path)
+@doctor_check()
+def _check_checkpoint_store(should_fix: bool, f: Finding) -> None:
+ """/rollback store footprint: warn when checkpoints are on and the store sits above its cap."""
+ from tools.checkpoint_manager import checkpoint_footprint_notice
+ notice = checkpoint_footprint_notice()
+ if notice:
+ check_warn(notice)
+
+
def _gh_authenticated() -> bool:
"""Check if gh CLI is authenticated via token file or device flow.
diff --git a/hermes_cli/update_cmd_maint.py b/hermes_cli/update_cmd_maint.py
index 2413d96d2df..9401a8b5904 100644
--- a/hermes_cli/update_cmd_maint.py
+++ b/hermes_cli/update_cmd_maint.py
@@ -967,6 +967,14 @@ def _refresh_cua_driver_after_update() -> None:
install_cua_driver(upgrade=True, require_confirmed_update=True, show_installer_progress=False)
+def _print_checkpoint_footprint_notice() -> None:
+ """Surface a GB-scale /rollback store the user may not know is on (see the helper's docstring)."""
+ from tools.checkpoint_manager import checkpoint_footprint_notice
+ notice = checkpoint_footprint_notice()
+ if notice:
+ print(f"\n\033[1;33mℹ {notice}\033[0m")
+
+
def _print_plugin_compat_notice() -> None:
"""Installed plugins importing paths that the Sep 2026 decomposition scheduled for removal."""
from hermes_cli.plugin_compat import compat_report, removal_in_effect, summary_lines
@@ -997,6 +1005,7 @@ def _print_post_update_notices_and_self_heals() -> None:
('hermes-acp launcher self-heal failed: %s', _ensure_acp_launcher),
('Windows bin launcher migration failed: %s', _migrate_windows_bin_path),
('cua-driver refresh failed: %s', _refresh_cua_driver_after_update),
+ ('Checkpoint footprint notice failed: %s', _print_checkpoint_footprint_notice),
('Plugin compat notice failed: %s', _print_plugin_compat_notice),
# Legacy HERMES_NEMO_RELAY_ATIF_*/ATOF_* vars produce no traces since the Relay cutover;
# generate each profile's relay-plugins.toml instead of leaving exports silently dead.
diff --git a/tests/tools/test_checkpoint_footprint_notice.py b/tests/tools/test_checkpoint_footprint_notice.py
new file mode 100644
index 00000000000..2c25a68d989
--- /dev/null
+++ b/tests/tools/test_checkpoint_footprint_notice.py
@@ -0,0 +1,46 @@
+"""``checkpoint_footprint_notice``: tells a user their /rollback store is on and large.
+
+Checkpoints were on by default Mar–May 2026 and that ``enabled: true`` persisted into user
+configs after the default flipped back, so a GB-scale store can sit under a feature the user
+never invokes. The notice fires only when checkpoints are enabled AND the store is at/over
+``max_total_size_mb``; it names the opt-out.
+"""
+
+import os
+
+import yaml
+
+from hermes_constants import get_hermes_home
+from tools.checkpoint_manager import CheckpointManager, checkpoint_footprint_notice
+
+
+def _write_config(enabled: bool, cap_mb: int) -> None:
+ home = get_hermes_home()
+ home.mkdir(parents=True, exist_ok=True)
+ (home / "config.yaml").write_text(
+ yaml.safe_dump({"checkpoints": {"enabled": enabled, "max_total_size_mb": cap_mb}}), encoding="utf-8")
+
+
+def test_notice_only_when_enabled_and_over_cap(tmp_path, monkeypatch):
+ base = get_hermes_home() / "checkpoints"
+ monkeypatch.setattr("tools.checkpoint_manager.CHECKPOINT_BASE", base)
+ work = tmp_path / "proj"
+ work.mkdir()
+ (work / "blob.bin").write_bytes(os.urandom(2 * 1024 * 1024)) # incompressible → store > 1 MB
+ _write_config(enabled=True, cap_mb=1)
+ assert CheckpointManager(enabled=True, max_total_size_mb=1).ensure_checkpoint(str(work), "seed")
+
+ notice = checkpoint_footprint_notice()
+ assert notice and "checkpoints.enabled false" in notice and "1 project" in notice
+
+ _write_config(enabled=True, cap_mb=500) # under the cap: no nag for a healthy store
+ assert checkpoint_footprint_notice() is None
+
+ _write_config(enabled=False, cap_mb=1) # off: the store's size is irrelevant
+ assert checkpoint_footprint_notice() is None
+
+
+def test_doctor_registers_the_checkpoint_store_check():
+ from hermes_cli.doctor import DOCTOR_CHECKS
+ from hermes_cli.doctor_state import _check_checkpoint_store
+ assert any(check is _check_checkpoint_store for _title, check in DOCTOR_CHECKS)
diff --git a/tools/checkpoint_manager.py b/tools/checkpoint_manager.py
index 7ef771ee42f..5e192c018cf 100644
--- a/tools/checkpoint_manager.py
+++ b/tools/checkpoint_manager.py
@@ -1178,6 +1178,32 @@ def auto_prune_from_config() -> Dict[str, object]:
return {"skipped": True, "error": str(exc)}
+def checkpoint_footprint_notice() -> Optional[str]:
+ """One-line notice when ``/rollback`` checkpoints are on and their store sits at or above
+ ``checkpoints.max_total_size_mb``, else None. Checkpoints were on by default for a while
+ (Mar–May 2026) and that ``enabled: true`` persisted into user configs; many users carry a
+ GB-scale store for a feature they never invoke. The cap is a floor of one snapshot per
+ project, so a big store is expected, not broken — the notice names the opt-out. Never raises."""
+ try:
+ from hermes_cli.config import load_config
+ cfg = load_config().get("checkpoints") or {}
+ if not cfg.get("enabled", False):
+ return None
+ cap_mb = int(cfg.get("max_total_size_mb", 500) or 0)
+ status = store_status()
+ size = int(status["total_size_bytes"])
+ if cap_mb <= 0 or size < cap_mb * _MB:
+ return None
+ from hermes_cli.sizefmt import format_bytes
+ return (f"Filesystem checkpoints (/rollback) are on: {format_bytes(size)} across "
+ f"{status['project_count']} project(s), above the {cap_mb} MB cap (one snapshot per project is "
+ f"always kept). Not using /rollback? `hermes config set checkpoints.enabled false` then "
+ f"`hermes checkpoints clear`; or lower `checkpoints.retention_days`.")
+ except Exception as exc:
+ logger.debug("checkpoint footprint notice skipped: %s", exc)
+ return None
+
+
def store_status(checkpoint_base: Optional[Path] = None) -> Dict:
"""Summarise the shadow store: ``{"base", "store_size_bytes", "legacy_size_bytes",
"total_size_bytes", "project_count", "projects", "pre_v2_projects", "legacy_archives"}``.